1

I have a two table in my application. Left table is like a list. Clicking on left table will open a right table, which containing the values based which field I click on left table.

Now the problem is that if I edit a cell in right table and not pressing the Enter key and clicked to the new item in left table,the particular cell in editable mode in all the table. Also the value of the cell going to all the tables.

How can I fixed that problem?

kleopatra
  • 51,061
  • 28
  • 99
  • 211
Rounak
  • 89
  • 1
  • 2
  • 10

1 Answers1

4

Not entirely sure that I understand what you experience vs what you expect, but table's default behaviour is a bit unexpected in that it doesn't commit an ongoing edit when the focus goes somewhere to the outside of the table. To force committing the edited value when navigating to another component, you have to configure the table with:

table.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
kleopatra
  • 51,061
  • 28
  • 99
  • 211
  • Thanks a lot kleopatra. It solved my one problem. But the value of previous focus automatically goes to new focus. – Rounak Feb 10 '12 at 10:46