public void line(double x,double y){
  Line line=new Line(x,y);
  if (x < minX) {
    minX=x;
  }
  if (y < minY) {
    minY=y;
  }
  if (x > maxX) {
    maxX=x;
  }
  if (y > maxY) {
    maxY=y;
  }
  elements.add(line);
}

public void line ( double x , double y ) { Line line = new Line ( x , y ) ; if ( x < minX ) { minX = x ; } if ( y < minY ) { minY = y ; } if ( x > maxX ) { maxX = x ; } if ( y > maxY ) { maxY = y ; } elements . add ( line ) ; }
draw a line in the current line style ( if any )
