Let me explain my flow step by step
1) I connect to the database as usual
2) I populate the table using my own method updateTable, in this method I use rs2xml.jar to bind the Table Model with the database
3) I create a Table mouse click event, in this event, I copy the values of the model of the current selected row of the table
4) After that, I have an update button that updates the database and model.fireTableDataChange(); and finally refreshing the table by calling updateTable again
5) Everything goes fine until the table is modified by modifying the text field and clicking on the update button.
6) The table model seems not being changed at all.
7) When I click on the table again, the old value comes up again on the textfields
When I type "max" to replace "tammie" and press update, the table is updated, when I select back on that record on the table, the textfield is wrong this time.
Any ideas why this behaviour would happen?
I don't see why the presence or absence of that line would make a difference, since it isn't changing the table model in any way. So I think you should continue to look for code which you think is changing the table model and fix it so that it does actually change the table model.
Or if you want serious help with your problem, produce an SSCCE (<== read that link) which people would be willing to look at.
- no idea why you held data in List<List<, on bottm (linked code) is model based on List
- all data for JTable are stored in XxxTableModel, use that for only for this reason, JTables view is about preview value came from model, (in this case I don't talking something about editing cell, this will be separate thread)
- split this question to two three separate threads, one about JTable and its view, JTable and view_to_model connection to model and possible Concurency that came from lond and hard JDBC events
- notice you mixing simple array Object saveObj = new Object; and List<List< in your model, debug that if returned proper and awaiting value
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Strange behavior in interaction between JTable and DefaultTableModel