|
-
Jan 11th, 2008, 06:47 PM
#1
Thread Starter
New Member
[RESOLVED] Update JLabel every second
I currently have a Jframe with a JLabel on it and I have a thread that just increments a counter and sleeps for 2000. My problem is I tried to display the counter's value in the JLabel every 1000 ms and it will not work. So I was wondering how I update a JLabel if I create a new class and thread that class and I need to display information in that class on a form in another class.
-
Jan 12th, 2008, 07:02 AM
#2
Re: Update JLabel every second
use javax.swing.Timer instead of a thread
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|