public void run(){
  //Loop until we have finished the race.
  while ((myPosition <numberofSteps)&& keepRunning){
    //Move ahead one position.
    myPosition++;
    repaint();

    //Put ourselves to sleep so the paint thread can get around to painting.
    try{
      Thread.currentThread().sleep(10);
      }catch (Exception e){System.out.println("Exception on sleep");}
    }
  System.out.println("Threader:"+myName+Ó has finished the raceÓ);
}
