February 2014
Beginner
1248 pages
62h 25m
English
• JComponents method paintComponent (p. 522) is called when a lightweight Swing component is displayed. Override this method to specify how to draw shapes using Java’s graphics capabilities.
• When overriding paintComponent, call the superclass version as the first statement in the body.
• Subclasses of JComponent support transparency. When a component is opaque (p. 522), paintComponent clears its background before the component is displayed.
• The transparency of a Swing lightweight component can be set with method setOpaque (p. 522; a false argument indicates that the component is transparent).
• Class Point (p. 523) package java.awt represents an x-y coordinate.
• Class Graphics (p. ...
Read now
Unlock full access