Threads in applets
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Friday, March 5, 2004 04:11 PM

I have an applet which runs an animation in Java3D. There are 2 animation sequences which need to be executed in an order. Say for instance, the 2nd animation sequence needs to be executed only after the 1st sequence is done. So, to accomplish this I used threads. (I hope this thats the way to do it). I call the thread on the 2nd animation and make the thread sleep for a fixed amount of time (till the 1st animation is done). The animation exectues as expected. First the 1st animation is done and then the 2nd animation. Now the problem is that while the 1st animation is being done the applet completely freezes. Meaning, I cannot use any buttons (or other swing components) on the applet (nor can i close the applet window; I   More>>


I have an applet which runs an animation in Java3D.
There are 2 animation sequences which need to be executed in an order. Say for instance, the 2nd animation sequence needs to be executed only after the 1st sequence is done. So, to accomplish this I used threads. (I hope this thats the way to do it). I call the thread on the 2nd animation and make the thread sleep for a fixed amount of time (till the 1st animation is done). The animation exectues as expected. First the 1st animation is done and then the 2nd animation.



Now the problem is that while the 1st animation is being done the applet completely freezes. Meaning, I cannot use any buttons (or other swing components) on the applet (nor can i close the applet window; I need to stop the application from JBuilder)
This does not happen while the 2nd animation runs(I can do any actions on the applet)


Does anyone plz let me know how to fix this problem


Thanks a lot


Deepak

   <<Less
About | Sitemap | Contact