public static @Nullable JScrollPane getScrollPane(@Nullable JScrollBar bar) {
    Container parent = bar == null ? null : bar.getParent();
    return parent instanceof JScrollPane ? (JScrollPane)parent : null;
  }
public static @Nullable JScrollPane getScrollPane(@Nullable JScrollBar bar)