@Override
      protected boolean preprocessEventForTextField(KeyEvent e) {
        if ((KeyEvent.VK_ENTER == e.getKeyCode()) || ('\n' == e.getKeyChar())) {
          e.consume();
          addCurrentTextToHistory();
          perform();
        }
        return super.preprocessEventForTextField(e);
      }
@Override
      protected boolean preprocessEventForTextField(KeyEvent e)