MediaTracker t = new MediaTracker( this );
t.addImage( orangeball, 0 );
t.addImage( pinkball, 1 );
try
   {
   t.waitForAll();
   }
catch ( InterruptedException e )
   {
   Thread.currentThread().interrupt();
   }