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()
try{ DefaultTableModel dtm = (DefaultTableModel) jTable2.getModel(); dtm.setNumRows(0); }catch(Exception e){ }