@Override
  public void setCaptionIcon(@Nullable Icon icon) {
    if (myCaption instanceof TitlePanel titlePanel) {
      titlePanel.setRegularIcon(icon);
      titlePanel.setInactiveIcon(icon);
    }
  }
@Override
  public void setCaptionIcon(@Nullable Icon icon)