• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to force a value set from cell editor to table?

 
Jack Lau
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does any one know how to force a value set from cell editor to table?

Thanks,
Jack
 
Rob Spoor
Sheriff
Posts: 20817
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cellEditor.stopCellEditing()?

From its API:
Tells the editor to stop editing and accept any partially edited value as the value of the editor. The editor returns false if editing was not stopped; this is useful for editors that validate and can not accept invalid entries.

As soon as the cell editor accepts its value, it's passed to the table model which will inform the table.

Well, unless you use a custom cell editor or table model that forgets to perform these steps.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!