private static @NotNull JComponent createHintComponent(@NotNull @NlsContexts.HintText String secondInvocationTitle,
                                                         boolean isWarning,
                                                         @NotNull JComponent button) {
    if (ExperimentalUI.isNewUI()) {
      JPanel panel = new JPanel(new BorderLayout(6, 0));
      panel.putClientProperty(HintHint.OVERRIDE_BORDER_KEY, JBUI.insets(10, 12, 12, 12));

      JComponent label =
        isWarning ? HintUtil.createWarningLabel(secondInvocationTitle) : HintUtil.createInformationLabel(secondInvocationTitle);
      label.setBorder(JBUI.Borders.emptyTop(2));
      panel.add(label, BorderLayout.CENTER);

      panel.setBackground(label.getBackground());
      button.setBackground(label.getBackground());
      button.setPreferredSize(new JBDimension(22, 22));
      button.setBackground(label.getBackground());

      Wrapper buttonPanel = new Wrapper();
      buttonPanel.add(button, BorderLayout.NORTH);
      panel.add(buttonPanel, BorderLayout.EAST);

      return panel;
    }

    JComponent label = HintUtil.createInformationLabel(secondInvocationTitle);
    if (isWarning) {
      label.setBackground(MessageType.WARNING.getPopupBackground());
    }

    JPanel panel = new JPanel(new BorderLayout());
    button.setBackground(label.getBackground());
    panel.setBackground(label.getBackground());
    label.setOpaque(false);
    label.setBorder(null);
    panel.setBorder(HintUtil.createHintBorder());
    panel.add(label, BorderLayout.CENTER);
    panel.add(button, BorderLayout.EAST);
    return panel;
  }
private static @NotNull JComponent createHintComponent(@NotNull @NlsContexts.HintText String secondInvocationTitle,
                                                         boolean isWarning,
                                                         @NotNull JComponent button)