JComponent () { JPanel filePanel = createFilePanel(); JComponent settingsPanel = myExporter.getSettingsEditor(); if (settingsPanel == null) { return filePanel; } JPanel northPanel = new JPanel(new BorderLayout()); northPanel.add(filePanel, BorderLayout.NORTH); northPanel.add(settingsPanel, BorderLayout.CENTER); return northPanel; }