I'm using JTable to display data that i retrieve from the database. The user should be able to edit one of the columns. I've got a cell editor attached to that column and it returns the value i want. The problem is that this change doesnt appear on the table. So i assume that the data model hasnt changed or what. Which method should i override or call to ensure that the display changes as well.. Or is there any mehtod that can reset the JTable and draw it again. HELP
Saniya, I may be stating the overly obvious to you, but modifying the "TableModel" will not modify the data in the database. Somewhere in your implementation of "TableModel" needs to be (JDBC) code that updates the database with the value entered into the "JTable". Also, the "JTable" 'listens' to its "TableModel", so after modifying the data in your "TableModel", you should invoke the appropriate "fireTableXXX()" method (defined in "javax.swing.table.AbstractTableModel"). Hope this will help you. Good Luck, Avi.
What a show! What atmosphere! What fun! What a tiny ad!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop