How can I move a ball to the left once the left arrow is pressed, so the ball moves to the left side and should automatically return to the right once it reaches the end of the stage... And the same thing should be applied to the right arrow.
What are the steps to go through?
Any help would be appreciated....
you need to create a keyboard listener. check the Key class for sample code.