I am using a JTable and I let the user fill it in with integers in one of the columns (the interface with the table pops out in a seperate window). When I type a value and press “ENTER” and then close the window everything saves fine. However, if I just type something in one of the cells and close the window, when I reopen it the new cell values are not there.
I would like the values to be updated in real time as I type every single character. Is it possible? I’ve tried applying a TableCellEditor, but I couldn’t get it to work.
I’ve also tried add a KeyListener to the JTable, but the KeyPressed wouldn’t invoke at all.
(making my comment an answer, so you can close it 🙂
Assuming the input field is the editor inside the table itself, set the client property: