JPanel (@NotNull JComponent listPanel, @NotNull JPanel topPanel) { JPanel mainPanel = new JPanel(new BorderLayout()); mainPanel.add(topPanel, BorderLayout.NORTH); mainPanel.add(listPanel, BorderLayout.CENTER); return mainPanel; }