I'm trying to use Thread.sleep(1000) in a swing
applet but its not working the way I want. I read that I have to use the javax.swing.timer class. I've read several tutorials on this, but I still can't seem to get it to work. Is there an easy way I can use javax.swing.timer or anything else to emulate the Thread.sleep(1000) functionality? Thank you.
Basically I need something like this, except thread.sleep doesnt work. How can I implement this with a swing timer or some other way? Thank You.
I tried declaring the following timer in my applet's init method:
and then I call flipTimer.start(); in the actionPerformed method, however this doesnt cause jLabel1 to be set. What am I doing wrong?