I have a JTable and DefaultTableModel at class level.
First time when I initialize the jTable and Model I add 10 rows.
on Button click I get 3 rows from my database so I have to show only these 3 rows by removing earlier 10 rows.
I do this using tableModel.setDataVector(data, columnNames);
But the main problem is, the table only replaces 3 old rows with new one and still remaining 7 rows are shown as it is.
Can any one help?
Thanks,
Jai
If I have understood, you want to reconstruct the table with the 3 rows from the database and delete the earlier 10 rows. If that is true then do this,