|
How to display a Print Dialog in an application |
|
|
This Java tips illustrates a method of displaying a pring dialog in the application. This
may help developer to give an option to the user to change the default printer settings
such as the default printer, number of copies, range of pages, etc.
PrinterJob printtask = PrinterJob.getPrinterJob();
PageFormat format = pjob.defaultPage();
printtask.setPrintable(new PrintableClass(), format);
try {
if (printtask.printDialog()) {
printtask.print();
}
} catch (PrinterException e) {
}
|
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.