public void setComponent(@NotNull JComponent component, @NotNull JComponent titleComponent) {
    myMainComponent = component;
    removeAll();

    JPanel title = new JPanel(new BorderLayout());
    title.setBorder(BorderFactory.createEmptyBorder(0, 4, 0, 0));
    title.add(titleComponent);
    revalidate();

    final JPanel p = new JPanel(new BorderLayout());
    if (myEditorBorder != null) {
      p.setBorder(myEditorBorder);
    }
    p.add(component, BorderLayout.CENTER);
    add(p, BorderLayout.CENTER);
    add(title, BorderLayout.NORTH);
  }
public void setComponent(@NotNull JComponent component, @NotNull JComponent titleComponent)