I need to remove all the rows in my JTable.
I have tried both of the following:
/** * Removes all the rows in the table */ public void clearTable()
Read the API for DefaultTableModel - setRowCount method supports deleting/discarding all rows in one go...
((DefaultTableModel)myTable.getModel()).setRowCount(0);