Sets the background color for the Graphics2D
context.
The background color is used for clearing a region.
When a Graphics2D
is constructed for a
Component
, the background color is
inherited from the Component
. Setting the background color
in the Graphics2D
context only affects the subsequent
clearRect
calls and not the background color of the
Component
. To change the background
of the Component
, use appropriate methods of
the Component
.
color | the background color that isused in
subsequent calls to clearRect |
getBackground, java.awt.Graphics.clearRect
Diagram: Graphics