JComponent () { JPanel panel = new JPanel(new BorderLayout()); JPanel _panel; Box box = Box.createVerticalBox(); _panel = new JPanel(new BorderLayout()); JTextField sourceClassField = new JTextField(); sourceClassField.setText(mySourceClassName); sourceClassField.setEditable(false); _panel.add(new JLabel(RefactoringBundle.message("move.members.move.members.from.label")), BorderLayout.NORTH); _panel.add(sourceClassField, BorderLayout.CENTER); box.add(_panel); box.add(Box.createVerticalStrut(10)); _panel = new JPanel(new BorderLayout()); JLabel label = new JLabel(RefactoringBundle.message("move.members.to.fully.qualified.name.label")); label.setLabelFor(myTfTargetClassName); _panel.add(label, BorderLayout.NORTH); _panel.add(myTfTargetClassName, BorderLayout.CENTER); _panel.add(myIntroduceEnumConstants, BorderLayout.SOUTH); box.add(_panel); myTfTargetClassName.getChildComponent().getDocument().addDocumentListener(new DocumentListener() { @Override public void documentChanged(@NotNull DocumentEvent e) { myMemberInfoModel.updateTargetClass(); validateButtons(); } }); panel.add(box, BorderLayout.CENTER); panel.add(Box.createVerticalStrut(10), BorderLayout.SOUTH); validateButtons(); return panel; }