I created 3 JTables 2X2 each and all the tables are empty,.. Now i want
to update each of the JTable cells. How can i do that.
i created Jtable as follows
JTable Table; // i created 3 table varaibles TableOne, TableTwo,
TableThree
DefaultTableModel model; // i used the same model for all tables
When i created a program with single JTable, i used to update with
following commands
model.insertRow(Integer.parseInt(iterno)-1, new Object[] {iterno ,
host_choice, });
model.removeRow(Integer.parseInt(iterno));
Now i have one 'model' and 3 tables, how can i update all the three
tables with single 'model'. or should i have to create 'model' for each
JTable
Thank you
Oliver Wong - 28 Mar 2006 19:30 GMT
>I created 3 JTables 2X2 each and all the tables are empty,.. Now i want
> to update each of the JTable cells. How can i do that.
[quoted text clipped - 13 lines]
> tables with single 'model'. or should i have to create 'model' for each
> JTable
If you associate the same model with all 3 tables, whenever you update
the model, the 3 tables should automatically update themselves. If this
doesn't work, perhaps you can post an SSCCE demonstrating the problem. See
http://mindprod.com/jgloss/sscce.html
- Oliver