Your running into a common issue when it comes to drawing things with swing. Swing is a single threaded model, and updates and listeners are called on this thread. When you call Thread.sleep you end...
Type: Posts; User: copeg
Your running into a common issue when it comes to drawing things with swing. Swing is a single threaded model, and updates and listeners are called on this thread. When you call Thread.sleep you end...
I don't see where the KeyListener is added to any component (also don't see how this compiles, but that's a separate issue). Call addKeyListener to do so (See How to Write a Key Listener (The Java™...