Delete all rows from a Java JTable with a custom TableModel

I want to clear all rows in a custom TableModel. Unfortunately, a custom TableModel in Java does not allow use of most efficient of row clearing methods, which only applies to a DefaultTableModel like that shown below: myTableModel.getDataVector().removeAllElements(); myTableModel.fireTableDataChanged(); To do an all clear like the above, for a custom TableModel, you need to reset … Continue reading Delete all rows from a Java JTable with a custom TableModel