private static int adjustIncrement(Rectangle visibleRect, int orientation, int direction, int increment) {
    if (increment == 0 && orientation == SwingConstants.VERTICAL && direction < 0) {
      return visibleRect.y;
    }
    return increment;
  }
private static int adjustIncrement(Rectangle visibleRect, int orientation, int direction, int increment)