Is it possible to clear a JTable using an AbstractTableModel so that it can be reloaded with different data and not destroy/recreate the JTable from scratch?

Brian Bilbro

I haven't tried the method you want but the following method works well for me:

public void removeAllRows()
  for(int i=this.getRowCount();i>0;--i)

I add this method to a class that inherits the data model class I need and then call this method as part of retrieving a new set of data.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact