This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Hi Jamie, please let me know if you find the solution. Im struggling with the same problem
Joined: Nov 05, 2001
hi martin, managed to find a solution, though i not sure whether it is what you want. anyway what i did is to add a TableModelListener to the TableModel(i use DefaultTableModel) and implement the TableChanged method to update to the DB using sql statement when the listener detect a change. Of cos, you need to get the values from the JTable, to get edited values use JTable.getModel().getValueAt(int row, int col), instead of JTable.getValueAt(int row, int col). So far, i still trying to see if it will generate any further bugs, using this method. Btw, you have to be careful on using the listener if your program involves refreshing after data are updated. if not it will generate exception such as "Sorter not informed of a change in model." if my explanation is unclear, do let me know. hope the info is useful to you. [ June 07, 2002: Message edited by: jamie ong ] [ June 07, 2002: Message edited by: jamie ong ]
Joined: May 16, 2002
Thanks Jamie, that might also be the solution to my problem. Anyway, if you find something that is useful (for this issue) to know please let me know -Martin