public @NotNull JPanel wrap(@NotNull JComponent mainComponent) {
    JPanel panel = new JPanel(new BorderLayout());
    panel.add(this, BorderLayout.NORTH);
    panel.add(mainComponent, BorderLayout.CENTER);
    return panel;
  }
public @NotNull JPanel wrap(@NotNull JComponent mainComponent)