posted 21 years ago
Hi,
In the class that you extend from AbstractTableModel, you must override two methods:
isCellEditable must return true for all cells which you want should be editable. If you want that all cells should be editable just do:
This will allow users to edit values in the table.
Now, to capture what value the user has passed, you have to override the setValueAt method. This method will be called when the user has finished editing a cell. The new value is passed as the first parameter. With this new value, you must do whatever it takes to make sure that a subsequent call to getValueAt on the same cell returns the new value (if the new value is acceptable).
I am sure you will be able to find examples of what you are trying to do somewhere in this forum.
Hope this helps,
Abhik.
[ July 04, 2003: Message edited by: Abhik Sarkar ]