@Override
    public void drawLine(int x1, int y1, int x2, int y2) {
        if (this.line == null) {
            this.line = new Line2D.Double(x1, y1, x2, y2);
        } else {
            this.line.setLine(x1, y1, x2, y2);
        }
        draw(this.line);
    }
@Override
    public void drawLine(int x1, int y1, int x2, int y2) {
        if (this.line == null) {
            this.line = new Line2D.Double(x1, y1, x2, y2);
        } else {
            this.line.setLine(x1, y1, x2, y2);
        }
        draw(this.line);
    }
@ Override public void drawLine ( int x1 , int y1 , int x2 , int y2 ) { if ( this . line == null ) { this . line = new Line2D . Double ( x1 , y1 , x2 , y2 ) ; } else { this . line . setLine ( x1 , y1 , x2 , y2 ) ; } draw ( this . line ) ; }
Draws a line from {@code (x1, y1)} to {@code (x2, y2)} using
the current {@code paint} and {@code stroke}.

@param x1  the x-coordinate of the start point.
@param y1  the y-coordinate of the start point.
@param x2  the x-coordinate of the end point.
@param y2  the x-coordinate of the end point.
Draws a line from { @code ( x1 y1 ) } to { @code ( x2 y2 ) } using the current { @code paint } and { @code stroke } .