Package gov.nih.mipav.view
Class ScrollCorrector
- java.lang.Object
-
- gov.nih.mipav.view.ScrollCorrector
-
- All Implemented Interfaces:
java.awt.event.AdjustmentListener
,java.util.EventListener
public class ScrollCorrector extends java.lang.Object implements java.awt.event.AdjustmentListener
Corrects a strange behaviour with JScrollPane when lines are appended from another thread. Moves the vertical slider to the last position.usage: add as an adjustment listener to the VerticalScrollBar, eg.,
scrollPane.getVerticalScrollBar().addAdjustmentListener(new ScrollCorrector());
Taken as a modified version from traiton , on Sun's bug parade. See: JTextArea's don't automatically scoll when appending() to them. 20 February 2001 entry.
Modified as needed.
- Author:
- traiton
-
-
Constructor Summary
Constructors Constructor Description ScrollCorrector()
Does nothing.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
adjustmentValueChanged(java.awt.event.AdjustmentEvent ae)
DOCUMENT ME!
-