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