PDA

Click to See Complete Forum and Search --> : [RESOLVED] Update JLabel every second


DTD33incSoft
Jan 11th, 2008, 05:47 PM
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.

ComputerJy
Jan 12th, 2008, 06:02 AM
use javax.swing.Timer instead of a thread