int newVisibleLines = height / lineHeight; painter.invalidateLineRange(firstLine + visibleLines, firstLine + newVisibleLines); visibleLines = newVisibleLines;
int oldVisibleLines = visibleLines; visibleLines = height / lineHeight; painter.invalidateOffscreen();
		public void componentResized(ComponentEvent evt)		{			int height = painter.getSize().height;			int lineHeight = model.getLineHeight();			if(height % lineHeight != 0)				height += lineHeight;			int newVisibleLines = height / lineHeight;			painter.invalidateLineRange(firstLine + visibleLines,				firstLine + newVisibleLines);			visibleLines = newVisibleLines;			updateScrollBars();		}