O'Reilly logo

Special Edition Using Java 2 Standard Edition by Geoff Friesen, Chuck Cavaness, Brian Keeton

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

Printing

The ability to print graphics to a printing device was introduced in Java 1.1. However, it's only through Java 2D that printing has become sophisticated. You can use Java 2D's printing API to perform the following tasks:

  • Print Java 2D and AWT graphics (including text and images)

  • Control document composition (such as reverse order printing)

  • Invoke printer-specific functions (such as stapling)

Note

Not all the aforementioned tasks are completely implemented in Version 1.3 of Java 2.

The printing API is located in the java.awt.print package. This package contains three interfaces and four classes, which are described in Table 18.3.

Table 18.3. Printing Classes and Interfaces
Interface/Class Description
Book This class provides ...

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