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!

Change JTable on a JPanel

843804Oct 27 2004 — edited Oct 27 2004
Hi, I doing a program and I found a little thing that is driving me crazy!

I have a JPanel that have a JTable inside a JScrollPane. Nothing new here. There is various buttons on the window and one of the buttons constructs a new table with data from a database that I want to substitute in the JScrollPane.

How can I do this? The only way I found is to remove all lines from the table and add one by one again.

If I change the JTable variable with a the new one, isn't there a way to redraw the JFrame with the new table ?

Thanks in advance to everyone that helps this beginner!
Eduardo
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 24 2004
Added on Oct 27 2004
8 comments
256 views