Listening to applet moved around



Is there a way to detect the changes in screen location of the applet
as its parent browser is moved or resized?

I have the applet which start java.awt.Frame and places is directly on
top of the applet. I would like to be able to make this Frame follow
the applet location when the browser window is moved or resized. I got
the following working quite fine:

class OverlayWindow extends Frame implements MouseListener,
MouseMotionListener {
...
}

public class MyApplet extends Applet implements Runnable,
MouseListener, MouseMotionListener {
OverlayWindow overlay; // overlaying frame
...

public void mouseMoved(MouseEvent e) {
...
overlay.setLocation(this.getLocationOnScreen().x,
this.getLocationOnScreen().y);
}
}

The problem is that the mouseMoved() kicks in only after the browser
window is moved and the cursor comes back into the area occupied by
the applet.

I would prefer to get the overlay frame follow the applet as it
changes the locations. I looked at WindowListener interface but do not
see anything related to changing the window location.

.