How to change the text int JLabel under the while or for loop?
Posted
by guilgamos
on Stack Overflow
See other posts from Stack Overflow
or by guilgamos
Published on 2010-06-16T18:50:14Z
Indexed on
2010/06/16
18:52 UTC
Read the original article
Hit count: 140
I want to create a simple clock by using java. The code is very simply that i will give an example shown below
for(int i=0;i<=60;i++)
jLabel11.setText( Integer.toString(i) );
The problem is while I'm running my program the result didn't show the update in sequence. I mean it show only 60 digit immediately. It didn't show the change from 1 to 2 to 3 ... something like this.
How can i fix this problem.
Thank you in advance.
© Stack Overflow or respective owner