wood burning stoves*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 56
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: 14
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
Refreshing a window
How to save scroll position after dataTable refresh by a4j:poll ?
Refresh Jtable went you press update button
Meta Refresh