This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
 
Similar Threads
focus of JPanel
Refresh Jtable went you press update button
How to save scroll position after dataTable refresh by a4j:poll ?
Meta Refresh
Refreshing a window