Is it possible to get an event when an embedded Java applet changes position because the browser is moved?
The obvious method doesn’t work:
applet.addComponentListener(new ComponentListener() {
public void componentMoved(ComponentEvent e) {
System.out.println("componentMoved");
}
// snip
});
Call
getLocationOnScreen()for any fixed element it the applet in a loop. Note that will also fire when the page containing the applet is scrolled.