}
private SettingsDialog showPrintDialog(DialogContent content, Scheme[] schemes) {
PrinterJob printerJob = PrinterJob.getPrinterJob();
SettingsDialog settingsDialog = new SettingsDialog(getParentFrame(), printerJob, schemes, content);
UiUtilities.centerAndShow(settingsDialog);
if (settingsDialog.getResult() == SettingsDialog.OK) {
PrintJob job = settingsDialog.getPrintJob();
try {
printerJob.setPrintable(job.getPrintable(), job.getPageFormat());
printerJob.print();
settingsDialog.printingDone();
} catch (PrinterException e) {
util.exc.ErrorHandler.handle("Could not print pages: "+e.getLocalizedMessage(), e);
}
}
return settingsDialog;