Java JTable clicking out of a field that is being edited does not update field values
I display a JTable with editable text columns, when the user double-clicks on a column to edit a field, then clicks on another column, the field that was edited gets updated. But if the user double-clicks on a column to edit the field, makes changes, then presses a JButton somewhere on the same form, the table value is not updated automatically. (The JButton code uses the values in the table, and is not getting the latest value from that last field that was being edited.)
Is there a way to make JTable automatically update a field that's being edited when the focus changes to something else? Or at least is there some call I can put in the JButton's code to say "Finish/update and edits that were being done on the JTable"?
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.