diff -r a8bd152f64ad javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ScrollPaneSkin.java --- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ScrollPaneSkin.java Mon Jul 09 18:17:55 2012 +0100 +++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ScrollPaneSkin.java Tue Jul 10 19:02:14 2012 +0100 @@ -470,7 +470,13 @@ public class ScrollPaneSkin extends Skin */ if (vsb.getVisibleAmount() < vsb.getMax()) { double vRange = getSkinnable().getVmax()-getSkinnable().getVmin(); - double vPixelValue = vRange / getSkinnable().getHeight(); + double vPixelValue; + if (nodeHeight > 0.0) { + vPixelValue = vRange / nodeHeight; + } + else { + vPixelValue = 0.0; + } double newValue = vsb.getValue()+(-event.getDeltaY())*vPixelValue; if (!PlatformUtil.isEmbedded()) { if ((event.getDeltaY() > 0.0 && vsb.getValue() > vsb.getMin()) || @@ -496,7 +502,14 @@ public class ScrollPaneSkin extends Skin if (hsb.getVisibleAmount() < hsb.getMax()) { double hRange = getSkinnable().getHmax()-getSkinnable().getHmin(); - double hPixelValue = hRange / getSkinnable().getWidth(); + double hPixelValue; + if (nodeWidth > 0.0) { + hPixelValue = hRange / nodeWidth; + } + else { + hPixelValue = 0.0; + } + double newValue = hsb.getValue()+(-event.getDeltaX())*hPixelValue; if (!PlatformUtil.isEmbedded()) { if ((event.getDeltaX() > 0.0 && hsb.getValue() > hsb.getMin()) ||