JPanel () { JPanel customPanel = new JPanel(new BorderLayout()); customPanel.add(myUseCustomShelfDirectory, BorderLayout.WEST); customPanel.add(myShelfDirectoryPath, BorderLayout.CENTER); return customPanel; }