| Advanced Features > The Generic Printing Framework > Java Print Package and Printing API > The PrinterJob Class |
The PrinterJob Class |
INDEX
PREVIOUS
NEXT
|
The PrinterJob class is the root of the java.awt.print package. To print your component, you must create a PrinterJob object. The PrinterJob class has a static method called getPrinterJob(), which is used to create a concrete printer job.
To print your component, call the setPrintable(Printable painter) method to specify the Printable object you have implemented. To change the printer parameters you can open a dialog box by calling the printDialog() method.
You can also open a dialog box to change the page format by calling the pageDialog() method.
Finally, to send the printing job to the selected printers, call the print() method of the printer job. See the documentation of the PrinterJob class for more information.
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. Legal terms. | PREVIOUS NEXT |