Displaying the Print Dialog
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) {
}
thanks for z snippet but I've run into some problem with the reference to the 'PrintableClass' my editor is saying that it is undefined. Can you please elaborate a bit more