SwingUtilities.invokeLater(new Runnable() { public void run() { if(evt.getAdjustable() == vertical) setFirstLine(vertical.getValue()); else setHorizontalOffset(-horizontal.getValue()); } });
if(evt.getAdjustable() == vertical) setFirstLine(vertical.getValue()); else setHorizontalOffset(-horizontal.getValue());
		public void adjustmentValueChanged(final AdjustmentEvent evt)		{			if(!scrollBarsInitialized)				return;			// If this is not done, mousePressed events accumilate			// and the result is that scrolling doesn't stop after			// the mouse is released			SwingUtilities.invokeLater(new Runnable() {				public void run()				{					if(evt.getAdjustable() == vertical)						setFirstLine(vertical.getValue());					else						setHorizontalOffset(-horizontal.getValue());				}			});		}