src/java.desktop/share/classes/java/awt/ScrollPane.java
Print this page
*** 742,755 ****
}
Component c = scroller.getComponent(0);
switch(adj.getOrientation()) {
case Adjustable.VERTICAL:
! c.move(c.getLocation().x, -(value));
break;
case Adjustable.HORIZONTAL:
! c.move(-(value), c.getLocation().y);
break;
default:
throw new IllegalArgumentException("Illegal adjustable orientation");
}
}
--- 742,757 ----
}
Component c = scroller.getComponent(0);
switch(adj.getOrientation()) {
case Adjustable.VERTICAL:
! c.move(c.getLocation().x,
! -(value) + ScrollPane.this.getInsets().top);
break;
case Adjustable.HORIZONTAL:
! c.move(-(value) + ScrollPane.this.getInsets().left,
! c.getLocation().y);
break;
default:
throw new IllegalArgumentException("Illegal adjustable orientation");
}
}