I tried this and I get the updated data , but the old rows are still there. But after I rerun the application I get the correct data (the old one+the row updated).Hope you understand what I'm trying to say So what should I do?
looks a bit better, you forget to move fireTableRowsUpdated method in last line of you code/method ? And you have to include former rows too in fireTableRowsUpdated ! [ December 13, 2008: Message edited by: Mikko Kohtam�ki ]
posted 11 years ago
no that's not it. I'll show you my problem in pictures. This is my table before update: photobucket.com
Then don't just add them, but clear the model first: model.setRowCount(0). Well, that's the simple way, that also handles insertions from outside your application. You could also find the row for each record and update it, but then you miss those inserts.