Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Refresh jTable after inserting new data into the Database

843806May 26 2009 — edited May 31 2009
Hey 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 28 2009
Added on May 26 2009
14 comments
21,178 views