consider i have an image on the canvas. i want the user when he clicks 2 on the keypad for example, i want the canvas to wait for about one second and then change the the image. I tried using Thread.sleep(1000) and then changing the picture reference and then calling repaint() method. But here i get a problem, the canvas always changes the picture and gets repainted and then gets idle for one second. In java stand edition, i use to use timers and calling it everytime "start and stop", but in J2ME i read that the timer won't work properly when called sequentially.
can somebody help me?
Teach me to die that so I may<br />Rise glorious at the awful day
posted 12 years ago
A hack would be to introduce a state value. In the block, that gets excecuted when the user presses "2" you'll sleep for 1000 ms, then change the state.
Do report back if the above doesn't work, or is a bad approach
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads