It's not a secret anymore!
The moose likes Swing / AWT / SWT and the fly likes Table automatic refresh Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Table automatic refresh" Watch "Table automatic refresh" New topic

Table automatic refresh

Paulo Carvalho
Ranch Hand

Joined: Nov 12, 2008
Posts: 57

I have a SWT/JFace application which have a table (org.eclipse.swt.widgets.Table).
This table has some information which comes from a database. I would like to execute the query periodically (each 5 minutes) and refresh automatically the table with the new informations.

How can I do that?


Jonathan Smiths

Joined: Jan 29, 2010
Posts: 15
I think you should use a Swing Timer. This is a simple example.
Remember to pass the time in milliseconds, so 5 secs would be a parameter 5000 to the timer.
I agree. Here's the link:
subject: Table automatic refresh
It's not a secret anymore!