public void run(){
  JScrollBar jsb=scroller.getVerticalScrollBar();
  while (running) {
    try {
synchronized (histData) {
        histData.wait();
      }
      Thread.sleep(100);
    }
 catch (    Exception e) {
    }
    jsb.setValue(jsb.getMaximum());
  }
}

public void run ( ) { JScrollBar jsb = scroller . getVerticalScrollBar ( ) ; while ( running ) { try { synchronized ( histData ) { histData . wait ( ) ; } Thread . sleep ( 100 ) ; } catch ( Exception e ) { } jsb . setValue ( jsb . getMaximum ( ) ) ; } }
this run method runs in a separate thread created by this class and waits to be notified that it needs to scroll the window . if no data is being written to the log then it can be scrolled up and down by the user without being continuously autoscrolled to theby this thread .
