Index: java/awt/Container.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/java/awt/Container.java,v retrieving revision 1.30 diff -u -r1.30 Container.java --- java/awt/Container.java 17 Jan 2004 00:01:59 -0000 1.30 +++ java/awt/Container.java 19 Jan 2004 18:35:54 -0000 @@ -1633,8 +1633,18 @@ MouseEvent me = (MouseEvent) e; acquireComponentForMouseEvent (me); - if (mouseEventTarget != null) + // Avoid dispatching an ENTERED event twice + if (mouseEventTarget != null + && e.getID() != MouseEvent.MOUSE_ENTERED) { + // Calculate point translation for the event target. + // We use absolute location on screen rather than relative + // location because the event target might be a nested child. + Point parentLocation = nativeContainer.getLocationOnScreen(); + Point childLocation = mouseEventTarget.getLocationOnScreen(); + me.translatePoint(parentLocation.x - childLocation.x, + parentLocation.y - childLocation.y); + Component oldSource = (Component) me.getSource (); me.setSource (mouseEventTarget); mouseEventTarget.dispatchEvent (me);