0

I have this problem: added a jcheckbox in a jtable. In my model this jcheckbox is loaded with getValueAt and used the method setValueAt when selected by the user.

No problem until I push the confirm button, when all my row selected (true value) disappear and the loop doesn't read anything with true value.

Where is my mistake? How can I update the model before pressing my confirmation button?

kleopatra
  • 51,061
  • 28
  • 99
  • 211

1 Answers1

1

Sounds like you are looking for:

table.putClientProperty("terminateOnFocusLost", true);

This tells the table to try to commit any ongoing edits when the focus is transfered to the outside, that is to a component which is not a child of the table.

kleopatra
  • 51,061
  • 28
  • 99
  • 211