EditorEx () { EditorEx editor = super.createEditor(); editor.getContentComponent().addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ENTER) { apply(mySliceTextField.getText(), false); } } }); return editor; }