public void propertyChange(PropertyChangeEvent e){
  String propertyName=e.getPropertyName();
  if (propertyName == "horizontalScrollBar" || propertyName == "verticalScrollBar") {
    if (e.getNewValue() instanceof JScrollBar) {
      setScrollBarRelations((JScrollBar)e.getNewValue());
    }
  }
}

public void propertyChange ( PropertyChangeEvent e ) { String propertyName = e . getPropertyName ( ) ; if ( propertyName == "horizontalScrollBar" || propertyName == "verticalScrollBar" ) { if ( e . getNewValue ( ) instanceof JScrollBar ) { setScrollBarRelations ( ( JScrollBar ) e . getNewValue ( ) ) ; } } }
this method gets called when a bound property is changed .
