Hello, there I have got a problem about JTable. I used DefaultTableModel to create a table, and the table is displayed properly. When I try to add or delete a row, it just does not update my table. Here is the code:
You can see that I try many ways to update my table, but all failed.So I suspect that : either addRow(), removeRow() do not cause any effect to the tablemodel, or I have not found the right way to update the change of the table.
Thank you very much, mausam. I try your code and it works fine. Actually, the code I provided is only a part of my class(it is a big one), so maybe something wrong with the rest of my class. I will keep working on it. Thank you again.