November 2002
Intermediate to advanced
848 pages
19h 59m
English
Any object derived from the Component class has a Graphics object that can be used to render graphics onto it. This means that the developer can render high impact graphics on all types of buttons, canvases, and check boxes. Basically, all the user interface objects have an accessible Graphics object that can be cast as a Graphics2D object and used by Java 2D.
So far, the examples have been deficient because they don't take the component size into account when drawing. It is obviously good programming practice to determine the Component's width and height and then scale the drawing accordingly. This can be done by using the Component's getSize() method. Scaling is used in the comprehensive ...
Read now
Unlock full access