protected void installKeyHandler(){
  textArea.addKeyListener(keyListener);
  editorPane.addKeyListener(keyListener);
}

protected void installKeyHandler ( ) { textArea . addKeyListener ( keyListener ) ; editorPane . addKeyListener ( keyListener ) ; }
installs the keylistener in the textarea and editorpane for handling the enter keystroke and updating the modified state .
