Graphics.clearRect

Overview | Methods | This Package | All Packages

Graphics.clearRect

Clears the specified rectangle by filling with the background color for the Graphics object.

Syntax

public final void clearRect( Rectangle rect )

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

Parameters

rect

A Rectangle object that specifies the area to clear.

x

The x-coordinate of the rectangular area to clear.

y

The y-coordinate of the rectangular area to clear.

width

The width of the area to clear.

height

The height of the area to clear.

Remarks

This method, though very fast, always fills the background with a solid color. If you need dithered color support, use the fill method.

See Also   setBackColor