Dimension dim = getSize();
	protected boolean ensureOffscreenValid()	{		Dimension dim = getSize();		if(offImg == null || offGfx == null			|| offImg.getWidth(null) != dim.width			|| offImg.getHeight(null) != dim.height)		{			offImg = textArea.createImage(dim.width,dim.height);			offGfx = offImg.getGraphics();			offscreenRepaint();			return true;		}		else			return false;	}