java - Force JTable to "commit" data to model while it is still in editing mode -
i have jtable follow.
so, while jtable still in editing mode (there keyboard cursor blinking @ dividend column), clicking ok directly not commit data table model. clicking ok merely close dialog box.
i need press enter explicitly, in order commit data table model.
while jtable still in editing mode, before closing dialog box, there way can tell jtable saying, "hey, time commit changes model"
the source code dialog box follow dialog box source code. @ jbutton1actionperformed
executed code when ok pressed.
i'm not sure if work (it have been nice have scce), try this:
tablecelleditor editor = table.getcelleditor(); if (editor != null) { editor.stopcellediting(); }
Comments
Post a Comment