Chapter 11. Graphics

The AWT and Swing toolkits support a mechanism for drawing two-dimensional graphical shapes within the bounds of any component. The Java 2D API , which is part of the JFC, defines a much more sophisticated graphics model for performing sophisticated two- dimensional graphics operations. The Java 2D API is not discussed here. This chapter only describes the basic graphics model available to AWT and Swing components.

Part of drawing graphics involves learning the JFC model for painting components. The AWT and Swing have different models for painting. ...

Get Java GUI Development: The Authoritative Solution now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.