public static void setPopupToggleComponent(@NotNull JBPopup jbPopup, @Nullable Component toggleComponent) {
    JComponent content = jbPopup.getContent();
    content.putClientProperty(POPUP_TOGGLE_COMPONENT, toggleComponent != null ? new WeakReference<>(toggleComponent) : null);
  }
public static void setPopupToggleComponent(@NotNull JBPopup jbPopup, @Nullable Component toggleComponent)