Issue with Java join() method.
- by gmunk
First of all here are some code snippets:
http://pastebin.com/9ZCwekXs
http://pastebin.com/TtLLXPYP
I'm trying to animate some images. The thing is that I want the main thread to wait for the animation thread to finish and then to continue. I searched around, read a little bit and decided to use the join() method. It perfectly waits for the thread to finish but I doesn't animate correctly. The repaint() method gets called 2 times instead of nine. I think maybe the problem is because I used singletons. Here is the singleton implementation.
http://pastebin.com/bA3qLZJE