int height = painter.getSize().height; int lineHeight = painter.getFontMetrics().getHeight(); int oldVisibleLines = visibleLines; visibleLines = height / lineHeight; painter.invalidateOffscreen(); updateScrollBars();
recalculateVisibleLines();
		public void componentResized(ComponentEvent evt)		{			int height = painter.getSize().height;			int lineHeight = painter.getFontMetrics().getHeight();			int oldVisibleLines = visibleLines;			visibleLines = height / lineHeight;			painter.invalidateOffscreen();			updateScrollBars();			scrollBarsInitialized = true;		}