Saturday, 7 September 2013

Value of Graphics g in paint(Graphics g) method Container class

Value of Graphics g in paint(Graphics g) method Container class

The official documentation paint(Graphics g) method says:
Paints the container. This forwards the paint to any lightweight
components that are children of this container. If this method is
reimplemented, super.paint(g) should be called so that lightweight
components are properly rendered. If a child component is entirely clipped
by the current clipping setting in g, paint() will not be forwarded to
that child. g - the specified Graphics window
But nowhere I found what is the function of Graphic object passed as
parameter.
Can anybody explain its significance.
Thanks.

No comments:

Post a Comment