Sunday, December 21, 2008

JTable, detect when any cell's value changes

I have a dataModel, TableModel that extends DefaultTableModel.
I needed to know If the user changed the values of the table,
for this I override the method setValueAt:

public void setValueAt(Object aValue, int row, int column){
super.setValueAt(aValue, row, column);
tableModelChanged = true;
}

No comments: