JComponent () { final JComponent repositoryPanel = super.createCenterPanel(); final JPanel wrapper = new JPanel(new GridBagLayout()); final GridBagConstraints gb = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, JBUI.insets(1), 0, 0); gb.weightx = 1; gb.weighty = 1; gb.gridwidth = 2; wrapper.add(repositoryPanel, gb); ++gb.gridy; gb.fill = GridBagConstraints.NONE; gb.weightx = 0; gb.weighty = 0; gb.gridwidth = 1; myFolderName = new JTextField(); gb.insets.top = 5; gb.anchor = GridBagConstraints.WEST; wrapper.add(new JBLabel(message("label.local.target")), gb); ++gb.gridx; gb.weightx = 1; gb.fill = GridBagConstraints.HORIZONTAL; wrapper.add(myFolderName, gb); gb.insets.top = 1; gb.weightx = 0; gb.fill = GridBagConstraints.NONE; gb.gridx = 0; ++gb.gridy; myFolderName.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { myFollowRemoteTarget = false; myFolderName.removeFocusListener(this); } }); myFolderName.addKeyListener(new KeyAdapter() { @Override public void keyTyped(KeyEvent e) { } @Override public void keyReleased(KeyEvent e) { checkEnabled(); } }); myFolderName.addInputMethodListener(new InputMethodListener() { @Override public void inputMethodTextChanged(InputMethodEvent event) { checkEnabled(); } @Override public void caretPositionChanged(InputMethodEvent event) { } }); final JBCheckBox checkout = new JBCheckBox(message("checkbox.checkout")); checkout.addActionListener(e -> myCheckout = checkout.isSelected()); wrapper.add(checkout, gb); return wrapper; }