I’m using a JTable with AbstractTableModel:
_model = new AbstractTableModel() {
@Override
public int getColumnCount() {
return _columns.size();
}
@Override
public int getRowCount() {
return _data.size();
}
@Override
public Object getValueAt(int row, int col) {
return _data.get(row)[col];
}
@Override
public String getColumnName(int i) {
return _columns.get(i);
}
};
When rows and columns change, calling table.revalidate() only shows changes to rows. Columns are exactly the same as before. Is there a way to force update for the whole table?
If you change columns you should call
fireTableStructureChangedon the model.