aspose file tools*
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
Author

Table automatic refresh

Paulo Carvalho
Ranch Hand

Joined: Nov 12, 2008
Posts: 57
Hello

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?

Thanks

Regards
Jonathan Smiths
Greenhorn

Joined: Jan 29, 2010
Posts: 15
I think you should use a Swing Timer.
http://www.java2s.com/Tutorial/Java/0240__Swing/SwingTimers.htm 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: http://aspose.com/file-tools
 
subject: Table automatic refresh