Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable -- Help please  RSS feed

 
Ambrose Tati
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
I've created a JTable (using a table model which extends the AbstractTableModel), to display data from a database which changes periodically. When the data changes in the table model
it's displayed in the JTable, but empty rows are kept in the JTable, if the less data is being displayed.
i.e. if first time round 10 rows are read from the database, JTable displays them all. But if second time round only 5 rows are read from the database, the JTable displays the 5 rows read plus 5 empty rows.
How can I refresh JTable to get rid of the empty rows?
Thanks in advance
Ambrose
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!