Because you don't know what state the Graphics component is in, and accessing it from a different thread (eg the main thread as opposed the EDT thread) makes matters much worse. Things like window...
Type: Posts; User: copeg
Because you don't know what state the Graphics component is in, and accessing it from a different thread (eg the main thread as opposed the EDT thread) makes matters much worse. Things like window...
First, I would highly recommend doing all your painting using the paintComponent method, and not have your own infinite 'mainLoop'. The EDT takes care of all of this for you and then some. If you...