@NotNull
  protected StateRestoringCheckBox addCheckboxToPanel(@NlsContexts.Checkbox String name, boolean toSelect, @NotNull JPanel panel, boolean toUpdate) {
    StateRestoringCheckBox cb = createCheckbox(name, toSelect, toUpdate);
    JComponent decoratedCheckbox = new ComponentPanelBuilder(cb).createPanel();
    decoratedCheckbox.setAlignmentX(Component.LEFT_ALIGNMENT);
    decoratedCheckbox.setBorder(JBUI.Borders.emptyBottom(8));

    panel.add(decoratedCheckbox);
    return cb;
  }
@NotNull
  protected StateRestoringCheckBox addCheckboxToPanel(@NlsContexts.Checkbox String name, boolean toSelect, @NotNull JPanel panel, boolean toUpdate)