|
|
|
|||
|
Displaying a Page Setup DialogYou can allow the user to specify page characteristics, such as the paper size and orientation, by displaying a Page Setup dialog. The page information is stored in aPageFormat object. Like the
Print dialog, the Page Setup dialog is displayed by calling a method on
the PrinterJob object, pageDialog.
The Page Setup dialog is initialized by using the
// Get a PrinterJob PrinterJob job = PrinterJob.getPrinterJob(); // Ask user for page format (e.g., portrait/landscape) PageFormat pf = job.pageDialog(job.defaultPage()); | |||
|