@Override
  public @NotNull Dimension getPreferredSize() {
    if (computedPreferredSize == null) {
      computedPreferredSize = getButtons().isEmpty() ? JBUI.emptySize() : recomputeBounds(false, null, false).size;
    }
    return computedPreferredSize;
  }
@Override
  public @NotNull Dimension getPreferredSize()