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
Steve Zeller
Greenhorn
Joined: Jan 31, 2001
Posts: 2
posted
0
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
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.