Move a ball on mouse click in Java
问题 I'm trying to create the classic Breakout game as part of my programming assignment. I have to start moving the ball on a mouse click from the user. So I'm using a mouselistener to achieve that. The code below is just a smaller, simpler version of what I'm trying to do. But it does not move the ball in gradual steps. It just displays the ball at it's final position after the while loop is done executing. import acm.graphics.*; import acm.program.*; import acm.util.*; import java.applet.*;