![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e686. Displaying the Print DialogThe print dialog allows the user to change the default printer settings such as the default printer, number of copies, range of pages, etc.PrinterJob pjob = PrinterJob.getPrinterJob(); PageFormat pf = pjob.defaultPage(); pjob.setPrintable(new PrintableClass(), pf); try { if (pjob.printDialog()) { pjob.print(); } } catch (PrinterException e) { }
e682. Getting the Dimensions of a Printed Page e683. Setting the Orientation of a Printed Page e684. Printing Pages with Different Formats e685. Displaying the Page Format Dialog © 2002 Addison-Wesley. |