File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Refreshing JTable at run time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Refreshing JTable at run time" Watch "Refreshing JTable at run time" New topic

Refreshing JTable at run time

Muhammad Afzal

Joined: Jul 25, 2001
Posts: 1
HI all
I have populated jtable from database while creating its object like
DBAccess db = new DBAccess();
JTable table = new JTable(db.getData(),db.getColumns());
but now I need to refresh this table at run time . Can any body send me solution.
Thanks for your time.
shalina gokarna

Joined: Jul 01, 2001
Posts: 10
You can create a Refresh Button on the same page on which you are displaying the JTable.On the click of that JButton,a Select query should be executed with the help of which you can display the new records also in the JTable.
I agree. Here's the link:
subject: Refreshing JTable at run time
It's not a secret anymore!