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

Summary

Unlike some object-oriented graphical toolkits, the AWT does not provide classes for specific shapes, such as Line and Circle classes. Instead, each AWT component comes with a Graphics object that is used to perform graphical operations in the component. In addition to components, other output devices, such as printers and offscreen images, also have associated Graphics for performing graphical operations.

java.awt.Graphics provides a wealth of methods for drawing and filling shapes, drawing text, and setting graphical parameters such as the color and font used for the next rendering operation. However, in some respects Graphics are quite limited—for instance, the pen used for drawing is restricted in size to a one-pixel square. The Java ...

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