public static @Nullable JScrollPane getScrollPane(@Nullable Component component) {
    return component instanceof JScrollBar
           ? getScrollPane((JScrollBar)component)
           : getScrollPane(component instanceof JViewport
                           ? (JViewport)component
                           : getViewport(component));
  }
public static @Nullable JScrollPane getScrollPane(@Nullable Component component)