offscreenRepaintLineRange(firstInvalid,lastInvalid);
try { if(firstInvalid == lastInvalid) { paintLine(offGfx,firstInvalid,textArea .getHorizontalOffset()); } else offscreenRepaintLineRange(firstInvalid, lastInvalid); } catch(Exception e) { System.err.println("Error repainting line" + " range {" + firstInvalid + "," + lastInvalid + "}:"); e.printStackTrace(); }
	public void update(Graphics g)	{		// returns true if offscreen was created. When it's created,		// all lines, not just the invalid ones, need to be painted.		if(ensureOffscreenValid())		{			firstInvalid = textArea.getFirstLine();			lastInvalid = firstInvalid + textArea.getVisibleLines();		}		if(firstInvalid != -1 && lastInvalid != -1)		{			offscreenRepaintLineRange(firstInvalid,lastInvalid);			firstInvalid = lastInvalid = -1;		}		g.drawImage(offImg,0,0,null);	}