private static @Nullable JComponent getParentLightweightHintComponent(@Nullable JComponent component) {
    Ref<JComponent> result = Ref.create();
    UIUtil.uiParents(component, false).reduce((a, b) -> {
      if (b instanceof JLayeredPane && ((JLayeredPane)b).getLayer(a) == JLayeredPane.POPUP_LAYER) {
        result.set((JComponent)a);
      }
      return b;
    });
    return result.get();
  }
private static @Nullable JComponent getParentLightweightHintComponent(@Nullable JComponent component)