how to refresh the content of JTable (like Flight information) urgent!!! plz.....
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mathius_Allo
Posted On:   Thursday, September 19, 2002 02:02 AM

Hi guys...

how do i update the content of my JTable periodically? let's say every 5 minutes.......

thx alot...

Re: how to refresh the content of JTable (like Flight information) urgent!!! plz.....

Posted By:   Christopher_Schultz  
Posted On:   Thursday, September 19, 2002 11:38 AM

You'll need a background thread to do the work.



I usually use a DefaultTableModel to store the data, because it lets you add data using the addRow methods. Check the docs for more information.



After you add data to the model, be sure to call fireTableModelDataChanged so that the GUI component refreshes itself.



-chris
About | Sitemap | Contact