aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes refresh a JPanel automatically with time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "refresh a JPanel automatically with time" Watch "refresh a JPanel automatically with time" New topic
Author

refresh a JPanel automatically with time

sum prit
Greenhorn

Joined: Mar 13, 2011
Posts: 14
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.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4642
    
    5

Cross posted?
http://www.java-forums.org/awt-swing/40442-how-refresh-contents-jpanel.html


luck, db
There are no new questions, but there may be new answers.
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3071
    
  33

Similar issue? refresh a JPanel automatically as time changes


Mohamed Sanaulla | My Blog
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39436
    
  28
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

Joined: Mar 13, 2011
Posts: 14
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
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3071
    
  33

This and this will be helpful
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: refresh a JPanel automatically with time