Partial Ball Thread Code
class Ball implements Runnable
{
Thread myThread;          // this ball's thread
double x, y;              // this ball's coordinates
String myNumber;          // ball's number as a string
boolean suspended;        // whether thread is suspended

public void run()
    {
    myThread = new Thread(this);   // make thread
    while( true )
      {
      move();                      // move the ball
      myThread.sleep(delayMs);     // sleep
      }
    }
...
}