|
-
Nov 12th, 2001, 07:56 AM
#1
Thread Starter
Randalf the Red
Timer thread not working in applets ...
I have just started working with threads. A simple classroom examle included creating three threads, one for displaying and updating the time, second for changing the colour of a label's text, and the third for scrolling the label's text.
Since the three together didn't quite produce the result I needed, I stripped the applet of the last two and worked with just the Timer thread. I don't have the code ready now, but the weirdest thing is the applet completely failed. It didn't crash or something, but instead of updating the counter every second, and adding one to it every time it incremented, it went on adding either 8 or 16 to the counter. Also the updates didn't take place exactly at every second.
Later, I changed the applet to an application, and that ran just fine. Does anyone know why the Timer thread misbehaved in the applet?
.
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
|