Notifies this UI delegate that it's time to paint the specified
component. This method is invoked by
JComponent
when the specified component is being painted.
By default this method will fill the specified component with
its background color (if its
opaque
property is
true
) and then immediately call
paint
.
In general this method need not be overridden by subclasses;
all look-and-feel rendering code should reside in the
paint
method.
Parameters:
-
g - the
Graphics
context in which to paint
-
c - the component being painted;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple components
See Also:
ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent)
,
JComponent.paintComponent(java.awt.Graphics)
,