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()) {
    } catch (PrinterException e) {