Toolkit.getDefaultToolkit().globalDispatchEvent(e);
  void dispatchEventImpl(AWTEvent e)  {    // This boolean tells us not to process focus events when the focus    // opposite component is the same as the focus component.    boolean ignoreFocus =       (e instanceof FocusEvent &&        ((FocusEvent)e).getComponent() == ((FocusEvent)e).getOppositeComponent());    if (eventTypeEnabled (e.id))      {        // the trick we use to communicate between dispatch and redispatch        // is to have KeyboardFocusManager.redispatch synchronize on the        // object itself. we then do not redispatch to KeyboardFocusManager        // if we are already holding the lock.        if (! Thread.holdsLock(e))          {            switch (e.id)              {              case WindowEvent.WINDOW_GAINED_FOCUS:              case WindowEvent.WINDOW_LOST_FOCUS:              case KeyEvent.KEY_PRESSED:              case KeyEvent.KEY_RELEASED:              case KeyEvent.KEY_TYPED:              case FocusEvent.FOCUS_GAINED:              case FocusEvent.FOCUS_LOST:                if (KeyboardFocusManager                    .getCurrentKeyboardFocusManager()                    .dispatchEvent(e))                    return;              case MouseEvent.MOUSE_PRESSED:                if (isLightweight())                  requestFocus();                break;              }          }        if (e.id != PaintEvent.PAINT && e.id != PaintEvent.UPDATE            && !ignoreFocus)          processEvent(e);      }    if (peer != null)      peer.handleEvent(e);  }