JComponent () { JPanel contentPanel = new JPanel(new BorderLayout(DEFAULT_HGAP, DEFAULT_VGAP)); JBLabel label = new JBLabel(VcsBundle.message("change.shelves.location.dialog.group.title")); contentPanel.add(label, BorderLayout.NORTH); JPanel buttonPanel = new JPanel(new BorderLayout(DEFAULT_HGAP, DEFAULT_VGAP)); buttonPanel.setBorder(JBUI.Borders.emptyLeft(20)); buttonPanel.add(createCustomShelveLocationPanel(), BorderLayout.NORTH); buttonPanel.add(createDefaultLocationPanel(), BorderLayout.SOUTH); contentPanel.add(buttonPanel, BorderLayout.CENTER); myMoveShelvesCheckBox.setAlignmentX(Component.LEFT_ALIGNMENT); myMoveShelvesCheckBox.setBorder(null); contentPanel.add(myMoveShelvesCheckBox, BorderLayout.SOUTH); return contentPanel; }