public void syncSizeWithToolbar(@NotNull JComponent toolbar) {
      myHeaderPanel.setPreferredSize(new Dimension(0, toolbar.getPreferredSize().height));
    }
public void syncSizeWithToolbar(@NotNull JComponent toolbar)