@Override
  public void addNotify() {
    if (getBackground() != null && !getBackground().equals(UIUtil.getPanelBackground())) {
      SwingUtilities.updateComponentTreeUI(this.getParent());
    }
    for (AnAction button : myActions) {
      ShortcutSet shortcut;
      if (button instanceof AnActionButton anActionButton) {
        shortcut = anActionButton.getShortcut();
      } else {
        shortcut = button.getShortcutSet();
      }
      if (shortcut != null) {
        if (button instanceof MyActionButton && myCustomShortcuts != null) {
          ShortcutSet customShortCut = myCustomShortcuts.get(((MyActionButton)button).myButton);
          if (customShortCut != null) {
            shortcut = customShortCut;
          }
        }
        button.registerCustomShortcutSet(shortcut, myToolbar.getTargetComponent());
        if (button instanceof RemoveButton) {
          registerDeleteHook((MyActionButton)button);
        }
      }
    }

    super.addNotify(); // call after all to construct actions tooltips properly
  }
@Override
  public void addNotify()