boolean isPrinting = g instanceof PrintGraphics;
boolean isPrinting = isPrinting(g);
	public void drawAll(Graphics g) {		boolean isPrinting = g instanceof PrintGraphics;		drawBackground(g);		if ((fBackgrounds != null) && !isPrinting) {			drawPainters(g, fBackgrounds);		}		drawDrawing(g);		if ((fForegrounds != null) && !isPrinting) {			drawPainters(g, fForegrounds);		}		if (!isPrinting) {			drawHandles(g);		}	}