e686. 显示打印窗口
The 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) {
}
Related Examples |