Advertisement
Guest User

stijn leenknegt

a guest
Feb 17th, 2010
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1. /**
  2.  * This method gets called when a bound property is changed.
  3.  * @param e A <code>PropertyChangeEvent</code> object describing
  4.  * the event source and the property that has changed. Must not be null.
  5.  *
  6.  * @throws NullPointerException if the parameter is null.
  7.  * @since 1.5
  8.  */
  9. public void propertyChange(PropertyChangeEvent e) {
  10.     String propertyName = e.getPropertyName();
  11.     if (propertyName == "horizontalScrollBar" ||
  12.     propertyName == "verticalScrollBar") {
  13.    
  14.     if (e.getNewValue() instanceof JScrollBar) {
  15.         setScrollBarRelations((JScrollBar)e.getNewValue());
  16.     }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement