• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

refresh a JPanel automatically with time

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sir/ Madam, i am facing a problem regarding how to refresh a JPanel in a timely manner. I have four JLabel in a JPanel which get value from database. My database has a table, where i have values in a timely manner within an interval of 1 hour. now i have to refresh my JLabel values i.e refresh JPanel so that as time changes i can display the new data from the database.

Now what i needed is that my JPanel need to be get refreshed automatically with the passing of time. When a day changes my JPanel get refreshed with date and time i.e if today is 13-03-2011 then next day i.e 14-03-2011 my JPanel need to be get refreshed automatically. I don't have much idea about timers and schedule. please help me and give me some suggestion so that i can continue............ please tel me what to write in action performed() method.

Please, help me in this regard. Any help from you will highly be appreciated. Thank you in advance.
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cross posted?
http://www.java-forums.org/awt-swing/40442-how-refresh-contents-jpanel.html
 
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Similar issue? refresh a JPanel automatically as time changes
 
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mohamed Sanaulla wrote:Similar issue? refresh a JPanel automatically as time changes

Good grief! Yes the two posts really are similar Are the two of you writing the same thing at the same time?
 
sum prit
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry Sir, may be both of us are posting the same thing. But we are not same. Sir, i have found something that timers can check servers time. But how it does? can you explain me and give a little bit of idea about it......

Thank you....
 
Mohamed Sanaulla
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This and this will be helpful
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic