Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

stopping a tableModelEvent

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

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) {
//stuff....
tableModel.setValueAt(new Boolean(true),
rowChanged, CHECK_COLUMN);
tableModel.setValueAt(currentTime, rowChanged,
STOCK_ADJ_TIME_COLUMN);
//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?

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on stopping a tableModelEvent Or get search suggestion and latest updates.