Graphics.drawRect

Overview | Methods | This Package | All Packages

Graphics.drawRect

Draws a rectangle using the specified coordinates.

Syntax

public final void drawRect( Rectangle rect )

public final void drawRect( int x, int y, int width, int height )

public final void drawRect( Rectangle rect, RasterOp op )

public final void drawRect( int x, int y, int width, int height, RasterOp op )

Parameters

rect

A Rectangle object that specifies the rectangle's coordinates.

x

The x-coordinate of top-left corner of rectangle.

y

The y-coordinate of top -left corner of rectangle.

width

The width of the rectangle.

height

The height of the rectangle.

op

A RasterOp object that describes how to render the rectangle.

Remarks

The rectangle is filled using the current brush, and the current pen is used to draw the rectangle's edge.

See Also   drawRoundedRect