class test
  {
  public static void main(String args[]) throws Exception
    {
    CanvasPlus canvas = new CanvasPlus("Hello world", 500,500,500,500);
    float x = 100, y = 400;
    float step = 1f; 
    while(true)
      {
      if(step > 0)
        {
        if(x < 400)
          {
          x+=step;
          y-=step;
          }
        else
          step*=-1;
        } 
      else 
        {
        if(x > 100)
          {
          x+=step;
          y-=step;
          }
        else
          step*=-1;
        } 
      canvas.clear();
      canvas.addLine(10,x,400,y);
      canvas.draw();
      } 
    }
  }
