else if (processKeyBinding(KeyStroke.getKeyStrokeForEvent(e), e, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, e.getID() == KeyEvent.KEY_PRESSED))  e.consume(); else {  Container current = this; while ((current = current.getParent()) instanceof JComponent) { if (((JComponent)current).processKeyBinding (KeyStroke.getKeyStrokeForEvent(e), e, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, e.getID() == KeyEvent.KEY_PRESSED)) { e.consume(); break; } if (current instanceof Window || current instanceof Applet || current instanceof JInternalFrame) break; } if (e.isConsumed()) return;     }
  protected void processKeyEvent(KeyEvent e)  {    // let the AWT event processing send KeyEvents to registered listeners    super.processKeyEvent(e);    processComponentKeyEvent(e);    // FIXME: this needs to be elaborated significantly, to do all the    // focus / ancestor / window searching for the various binding modes.    if (! e.isConsumed() &&        processKeyBinding(KeyStroke.getKeyStrokeForEvent(e),                           e, WHEN_FOCUSED, e.getID() == KeyEvent.KEY_PRESSED))      e.consume();  }