private static boolean isScrollBarNeeded(int location, int preferredSize, int extentSize) {
      return preferredSize > extentSize || location != 0;
    }
private static boolean isScrollBarNeeded(int location, int preferredSize, int extentSize)