Refresh jTable after inserting new data into the Database
843806May 26 2009 — edited May 31 2009Hey all,
I'm using Netbeans 6.5 to create a Desktop Application which is connected to a Java DB (Derby).
The first simple steps were all very successfull:
Create the jTable and bind it to the Database => everything works fine. When the application starts it correctly shows all data from the database.
The problem starts when I try to insert new data to the database.
For that reason I've created textfields and a button "Save". When I press the button it successfully inserts the data to the database but they are not displayed in the jTable (when the application starts they are all there, they are not updated at runtime) . I've tried table.invalidate() and table.repaint() but they just don't work.
Any help will be GREATLY appreciated. But please have in mind that most of the code is Netbeans-generated and most of it not editable.
Many thanks in advance.
George