I have a table with a custom TableCellEditor (extension DefaultCellEditor) with JFormattedTextField as an editor component.
Now I have a problem: when I press a separate button during editing. When the button is pressed, the editor remains “open and active” until I want it to stop editing so that the changes made are available for the operations invoked by the button.
So, how to make editing stop when you click a separate button. I tried setFocusLostBehavior (JFormattedTextField.COMMIT) for JFormattedTextField, but it did not seem to have an effect.
Hope someone has some good ideas =)
Touko source
share