Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java swing jtable remove all rows

DefaultTableModel dm = (DefaultTableModel) getModel();
int rowCount = dm.getRowCount();
//Remove rows one by one from the end of the table
for (int i = rowCount - 1; i >= 0; i--) {
    dm.removeRow(i);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #swing #jtable #remove #rows
ADD COMMENT
Topic
Name
3+3 =