O'Reilly logo

Graphic Java™ 1.2, Volume I: AWT, Third Edition by David M. Geary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Rendering Components

Components are rendered in the paint(Graphics) method, which is typically invoked under one of the following circumstances:

  1. A system paint or update event is generated

  2. An explicit call to repaint() is made

System paint and update events are generated whenever the component needs to be repainted as a result of manipulation of manipulating the window in which it resides. For example, if an applet window is covered by another window and subsequently brought to the front, a PaintEvent is generated and sent to the components within the applet that need to be repainted.

repaint() is often invoked explicitly, sometimes by the component itself, when the component's graphical representation changes. Component.repaint() is overloaded ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required