I have a JTABle and 2 button under the table. When I edit a cell and Enter value with the cursor in the cell and hit the Button. I don't get the new value in the cell. If I click outside the cell (say the next cell) and then hit the button, I do get the new value. Is this the default behavior of JTable ?
Originally posted by Harjit Singh: I have a JTABle and 2 button under the table. When I edit a cell and Enter value with the cursor in the cell and hit the Button. I don't get the new value in the cell. If I click outside the cell (say the next cell) and then hit the button, I do get the new value. Is this the default behavior of JTable ?
Try yourTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE) and see if it helps.
Yes JTable wants the user to press enter before it takes it. I have this in one of my programs JTable.putClientProperty(\"terminateEditOnFocusLost\", Boolean.TRUE); //make it like excel
Now when the cell looses focus it should save it. I have no idea how we figured that out...
I just downloaded the SwingLab widgets. Hoping that SwingLabs will be a little more intuitive
To get a wish, you need a genie. To get a genie, you need a lamp. To get a lamp, you need a tiny ad: