Sorry about the double post :roll: So I am trying to write an applet that will be interactive- a picture will momentarily flash on the screen at a random spot for some short amt of time and then disappear only to appear in a dif spot. The user has to click on the picture to win. I know that I should use 2 threads (maybe more?)but when I put the drawImage method in the 2nd thread (class ShowImage extends Thread) the method does not want to display the image. Any help would be appreciated!
Hi Mike, Welcome to JavaRanch. You can delete the second post yourself by selecting the edit icon at the top. It's the one that looks like a pencil and paper. Don't delete this one though. For your problem. Are you using swing or AWT?
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Joined: Jun 26, 2003
Thanks for the tip! I am on a laptop so I tend to press keys by accident as I type and unintended things happen... I am using AWT
I deleted the double post before I read Mikes directions to Mike.
"JavaRanch, where the deer and the Certified play" - David O'Meara
Joined: Jan 30, 2002
Originally posted by Mike Frya: Thanks for the tip! I am on a laptop so I tend to press keys by accident as I type and unintended things happen... I am using AWT
Instead of playing twenty questions with you, it might be best for you to post some code and let us take a look at it. Use the CODE button and paste (or type ) your code between the tags. AWT isn't as picky as swing is about displaying graphics outside the main event thread but it is usually wise to handle all of it in one place if you can.