aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes How to refresh JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "How to refresh JTable" Watch "How to refresh JTable" New topic
Author

How to refresh JTable

Allen Chan
Ranch Hand

Joined: Jun 07, 2002
Posts: 64
Hi Ranchers,
When peforming a search, I guess I should use JTable to show the result, but how do I refresh it?
Thanks in advance.
ravindra janapreddy
Ranch Hand

Joined: Jan 30, 2001
Posts: 84
Hi Allen
You can refresh the JTable as follows :
table.repaint();
Ravindra


SCEA, SCBCD, SCWCD, SCJD, SCJP
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937
You should send new data to table model, using a method defined in table model. Something like this:
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to refresh JTable