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.

.



Relevant Pages

  • Re: browser screen capture with java applet
    ... the applet would be to do the job of the actual image capturing on each ... current browser window - if that's relevant. ... minimum Java version. ...
    (comp.lang.java.programmer)
  • Re: JavaScript not being blocked/synched by Applet init()
    ... Applet, I am more than a tad concerned about developments. ... browser = JSObject.getWindow;} ... var lclNum; ... lclNum = chan.getNum; ...
    (comp.lang.java.programmer)
  • Re: Applet and parent browser
    ... I am getting "frame0" while the browser window name is ... I need my applet to obtain the reference to the parent window ... I need it to feed the specific API which will register ...
    (comp.lang.java.programmer)
  • Re: Applet mit einem Programm fernsteuern
    ... Ich finde es halt nunmal praktischer, die Ausgaben einer bestimmten Website direkt ins Programm einzulesen, statt zuerst den Browser anzuwerfen, die Ausgabe abzuspeichern und dann erst in mein Programm einzulesen. ... das du in eine Java-Anwendung ein reines Applet integrieren möchtest. ... Denn das fählt unter dem Punkt Daten-Diebstahl. ...
    (de.comp.lang.java)
  • Re: Java in Browser
    ... An unsigned applet can only access the host it is retrieved from. ... We want a browser to be our standard control interface, with each tab becoming a particular control function. ... Having said that, there is a real need for a standard Java app to be able to run in a browser tab, rather than independently. ...
    (comp.lang.java.programmer)