If you want to know when the TableModel has been updated you add a TableModelListener to the TableModel:
http://forum.java.sun.com/thread.jspa?forumID=57&threadID=566133
If you want to validate the data that is being edited before it is saved to the TableModel then you use a custom editor:
http://forum.java.sun.com/thread.jspa?forumID=57&threadID=645740
DefaultTableModel tablemodel = new DefaultTableModel(data,column);
tablemodel.addTableModelListener(new InteractiveTableModelListener());
public class InteractiveTableModelListener implements TableModelListener {
public void tableChanged(TableModelEvent evt) {
if (evt.getType() == TableModelEvent.UPDATE) {
}
}
}
> i still don't see how to call stop editing or cancel editing in tablelistener,
You can't, because the TableModel has already been updated.
Did you read my first reply, I gave two possible solutions (because I didn't understand your question) with the idea that you would use the appropriate one!!!.
if table listener couldn't call stop editing or cancelediting,
so please let me know how DefaultCellEditor or second link you give to me could update jlabel as amount information
note's
jlabel it's at different class file and my DefaultCellEditor it's at different class file to, i did this to make my class file reusebility.
i decide to increase duke to 8, please help me.
i will thank's to any one whose helpme, sorry for my english languang