The moose likes Swing / AWT / SWT / JFace and the fly likes Deleting JTable Row Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "Deleting JTable Row" Watch "Deleting JTable Row" New topic
Author

Deleting JTable Row

Rajasekaran Anand
Greenhorn

Joined: Sep 13, 2001
Posts: 23
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

Joined: May 17, 2001
Posts: 2823
Why can't you delete row 0? What happens when you try?
Renee Zhang
Ranch Hand

Joined: Sep 10, 2001
Posts: 72
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!
 
 
subject: Deleting JTable Row
 
IntelliJ Java IDE