This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Here i am able to edit the text in JTable and able to change the text,but when the cell lost focus the old text is placed and the new entry goes away.I am using abstract table model..can any body can help me in solving it?? thanks, selvas
I believe you'll need to use the stopCellEditing method on the TableCellEditor interface. Something like this in your FocusEvent method: TableCellEditor editor = table.getCellEditor(); if (editor != null) editor.stopCellEditing(); From the API: stopCellEditing public boolean stopCellEditing() Tell the editor to stop editing and accept any partially edited value as the value of the editor. The editor returns false if editing was not stopped, useful for editors which validates and can not accept invalid entries. Returns: true if editing was stopped