public static void dispose(@NotNull Component owner) {
    if (owner instanceof JComponent component) {
      HelpTooltip instance = (HelpTooltip)component.getClientProperty(TOOLTIP_PROPERTY);
      if (instance != null) {
        instance.hideAndDispose(component);
      }
    }
  }
public static void dispose(@NotNull Component owner)