• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Table automatic refresh

 
Paulo Carvalho
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic