The Java 2D API introduced in JDK 1.2 provides enhanced two-dimensional
graphics, text, and imaging capabilities for Java programs through
extensions to the Abstract Windowing Toolkit (AWT). This comprehensive
rendering package supports line art, text, and images in a flexible,
full-featured framework that enables the development of richer user
interfaces and sophisticated drawing programs and image editors.
The Java 2D API provides:
-
A uniform rendering model for display devices and printers.
-
A wide range of geometric primitives such as curves, rectangles, and ellipses and a mechanism for rendering virtually any geometric shape.
-
Mechanisms for performing hit detection on shapes, text, and images.
-
A compositing model that provides control over how overlapping objects are rendered.
-
Enhanced color support that facilitates color management.
-
Support for printing complex documents.