I know that you can call this method to delete a row from a JTable:
DefaultTableModel.deleteRow(index);
I need to delete all of the rows at some point, and this is not working:
for (int i=0; i<dtm.getRowCount(); i++)
{
dtm.removeRow(i);
mortgageTable.revalidate();
}
I tried revalidating, but that didn't work. This only deletes the last row. Now, at runtime the table consists of only one row and later many rows are added. So I'm thinking the DefaultTableModel is not picking up the newly added rows.