question: private void redirectEvent ( final MenuKeyEvent ev ) { Component invoker ; invoker = getInvoker ( ) ; if ( invoker != null ) { KeyEvent nev ; KeyListener [ ] listeners ; nev = new KeyEvent ( invoker , ev . getID ( ) , ev . getWhen ( ) , ev . getModifiersEx ( ) , ev . getKeyCode ( ) , ev . getKeyChar ( ) , ev . getKeyLocation ( ) ) ; listeners = invoker . getKeyListeners ( ) ; switch ( nev . getID ( ) ) { case KeyEvent . KEY_PRESSED : for ( final KeyListener l : listeners ) { l . keyPressed ( nev ) ; } break ; case KeyEvent . KEY_RELEASED : for ( final KeyListener l : listeners ) { l . keyReleased ( nev ) ; } break ; case KeyEvent . KEY_TYPED : for ( final KeyListener l : listeners ) { l . keyTyped ( nev ) ; } break ; default : } ev . consume ( ) ; } }
target:  Redirect key event to the menu's invoker.