JComponent () { final JPanel main = new JPanel(new BorderLayout()); final JPanel namePanel = new JPanel(new BorderLayout(0, 2)); final JLabel nameLabel = new JLabel(); nameLabel.setText(RefactoringBundle.message("changeSignature.name.prompt")); namePanel.add(nameLabel, BorderLayout.NORTH); namePanel.add(myNameField, BorderLayout.SOUTH); nameLabel.setLabelFor(myNameField); myNameField.addDataChangedListener(this::update); myVisibilityPanel = createVisibilityPanel(); if (!myNameField.hasSuggestions()) { myVisibilityPanel.registerUpDownActionsFor(myNameField); } final JPanel visibilityAndReturnType = new JPanel(new BorderLayout(2, 0)); if (!myTargetClass.isInterface()) { visibilityAndReturnType.add(myVisibilityPanel, BorderLayout.WEST); } final JPanel returnTypePanel = createReturnTypePanel(); if (returnTypePanel != null) { isReturnVisible = true; visibilityAndReturnType.add(returnTypePanel, BorderLayout.EAST); } final JPanel visibilityAndName = new JPanel(new BorderLayout(2, 0)); visibilityAndName.add(visibilityAndReturnType, BorderLayout.WEST); visibilityAndName.add(namePanel, BorderLayout.CENTER); main.add(visibilityAndName, BorderLayout.CENTER); setOKActionEnabled(false); setActionEnabled(PsiNameHelper.getInstance(myProject).isIdentifier(myNameField.getEnteredName())); final JPanel options = new JPanel(new BorderLayout()); options.add(createOptionsPanel(), BorderLayout.WEST); main.add(options, BorderLayout.SOUTH); return main; }