When I add a column to a JTable
. The table model is changed, but the table UI doesn't change. I called revalidate()
, repaint()
, updateUI()
,... none worked.
This is part of the code:
public void insertColumn(int col, String columnName){
this.columnIdentifiers.add(col, columnName);
for (Object row: this.dataVector) {
((Vector) row).add(col, null);
}
fireTableStructureChanged();
}
model.insertColumn(col + 1, el);