JTF > Demo Gallery > acm.graphics > DragObjects

Click anywhere in the window to start the animation.

The programs in this package all have the same effect but use three different strategies for animating a bouncing ball:

  1. Use the run method to provide a control thread
  2. Make the ball a Runnable object
  3. Use Swing timers to advance the animation