Index: java/awt/Component.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/Component.java,v retrieving revision 1.91 diff -u -r1.91 Component.java --- java/awt/Component.java 30 Nov 2005 19:19:23 -0000 1.91 +++ java/awt/Component.java 13 Jan 2006 21:15:18 -0000 @@ -2308,6 +2308,10 @@ */ public final void dispatchEvent(AWTEvent e) { + Event oldEvent = translateEvent(e); + if (oldEvent != null) + postEvent (oldEvent); + // Some subclasses in the AWT package need to override this behavior, // hence the use of dispatchEventImpl(). dispatchEventImpl(e); @@ -4597,7 +4601,7 @@ */ static Event translateEvent (AWTEvent e) { - Component target = (Component) e.getSource (); + Object target = e.getSource (); Event translated = null; if (e instanceof InputEvent) @@ -4790,16 +4794,12 @@ void dispatchEventImpl(AWTEvent e) { - Event oldEvent = translateEvent (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 (oldEvent != null) - postEvent (oldEvent); - if (eventTypeEnabled (e.id)) { // the trick we use to communicate between dispatch and redispatch