setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); Thread.yield(); job.print();
if(orientationRequested.equals(OrientationRequested.LANDSCAPE)) pageFormatOrientation = PageFormat.LANDSCAPE; else if(orientationRequested.equals(OrientationRequested.REVERSE_LANDSCAPE)) pageFormatOrientation = PageFormat.REVERSE_LANDSCAPE;
public void printMenuItem_ActionPerformed() {	final GetPrintableInterface pi = (GetPrintableInterface)CommandManager.getInstance().getCommand("GetPrintableInterface");	if (pi!=null)	new Thread() {		public void run() {			try {				PrinterJob job = PrinterJob.getPrinterJob();				job.setJobName(getTitle());				job.setPageable(pi.getPageable());				if (job.printDialog())				{					setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));					Thread.yield();					job.print();				}			} catch (PrinterException ex) {				ex.printStackTrace();				com.cosylab.vdct.Console.getInstance().println("Printing error: "+ex);			}			finally			{				setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));			}		}	}.start();}