This content has been marked as final. Show 2 replies
You have several problems with this, the one that is being express is just a visible manifestation of them.
1 - you cannot lock your game into an infinite loop and expect it to function well. You need a basic game loop setup with event listeners and timer driven.
2 - you don't allow other events to process normally--see problem 1.
3 - animation/graphics is going to be flickery and sluggish--see problem 1.
4 - you have great difficulty if not an impossibility go get meaningful feedback from any components--see problem 2.
There are a few of the things that you may now or you will see very shortly. Look up in the Tutorial on how to use javax.swing.Timer to setup scheduling control cycles for your games and animations.