• Post Reply Bookmark Topic Watch Topic
  • New Topic

Deleting JTable Row

 
Rajasekaran Anand
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am able to delete the rows except first row in JTable.I am
using AbstractTableModel and in that i am using vector for maintaining records.How to solve this problem??
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why can't you delete row 0? What happens when you try?
 
Renee Zhang
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure what's going on, but what you see is what you get from the getValueAt(int row, int col) method if you override it.
please make sure that you delete the data before you call fireTableRowsDeleted(indexOne , indexOne). And the method call should be fireTableRowsDeleted(0, 0).
Good luck!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!