Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

stopping a tableModelEvent

  Asked By: Sunil    Date: Dec 18    Category: Java    Views: 863

I have a table model listener where in the
'tableChanged', I have two consecutive setValueAt
statements as follows:

public void tableChanged(TableModelEvent e) {
if (e.getType()==TableModelEvent.UPDATE) {
tableModel.setValueAt(new Boolean(true),
rowChanged, CHECK_COLUMN);
tableModel.setValueAt(currentTime, rowChanged,
//more stuff...

The thing is, when I call 'setValueAt', it seems to
call 'tableChanged' again because a change was made to
the model. Is there any way to stop this and have each
'setValueAt' be called consecutively, then at the end
of the method have the table view change? Or will I
just have to control what happens in 'tableChanged'
through extensive if statements?