To remove all rows from a Java JTable created using Custom TableModel, try the following: MyModel myTableModel = (MyModel) myTable.getModel(); for (int i = myTableModel.getRowCount()-1; i >= 0; i--) myTableModel.deleteRow(i); Define the deleteRow(int row) method in the MyModel class.
Tag: OOPS
UML Diagrammer / Class Generator Tool on Linux
Astah Community Edition Today's object oriented languages require extensive use of objects, their inter-relationships and methods. There are several UML tools out there like UMlet, Umbrello on Linux, but this one from astah stands out. You can try the community edition before deciding to purchase a full version. It enables the creation of objects, building … Continue reading UML Diagrammer / Class Generator Tool on Linux
Simplest explanation to Objects in Object Oriented Programming
Teaching myself to program in Java by following the book Head First Java by Kathy Sierra and Bert Bates has been one of the best things to have happened this year, so far. After trying several years to understand object-oriented programming concepts, finally found this book that provides one of the best introductions. Finally, I … Continue reading Simplest explanation to Objects in Object Oriented Programming