I have a jtable, created a table model and a table cell editor.
The cell editor is JTextField. When I click on any cell, it turns to text field and I edit the contents.
When I click on another cell, the content of the text field reflected to the table model.
But when I click on any JButton outside the table after editing the text in the text field inside the cell,
the contents are not reflecting in the model.
In my table model setValue(), I called the fireTableDataChanged() method.
This can be achieved by calling cancelCellEditing() of the DefaultCellEditor, as soon as you know that the update on the table cell is over.
Joined: May 25, 2007
Thank you for the reply.
But its not working. I tried your suggestion, but after entering value in textfield which is a cell,
I clicked on the button and the textfield/cell's content disappeared and returning to the same situation.