Print « JProgressBar « Java Swing Q&A





1. How to display a print progress dialog in Swing?    stackoverflow.com

If I do this in my class that implements Printable,

PrinterJob job = PrinterJob.getPrinterJob();
job.setJobName( /* some name */ );
Book book = new Book();
book.append(this, new PageFormat());
job.setPageable(book);
boolean ok = job.printDialog();
if (ok) {
   ...