Hi,
I have a table off AbstractTableModel. The data in the table is stored in a Vector. Now, when I remove a row, I am removing it successfully from the vector, but this is not getting updated in the view i.e. in the GUI.
I read elsewhere that I need to use fireTableRowsDeleted(), and I am trying to call it inside a wrapper method in my AbstractTableModel:
dataModel = new AbstractTableModel() {
public void removeAl() {
fireTableRowsDeleted(0, getRowCount()-1);
}
};
But, this removeAl is not accessible for me. I cannot call it like this anywhere: dataModel.removeAl()
Could you please help me understand what is going wrong? How do I update the GUI on deletion of rows?
EDIT: As it turns out, the problem was elsewhere. Once I fixed that, removing the row from the Vector itself started updating the GUI. :)