How do I do this for an applet? Do I have to create a window the size
of the entire screen? But then doesn't the applet lose focus? Any help
would be appreciated.
Thanks,
Ron
Oliver Wong - 26 Apr 2006 18:04 GMT
> How do I do this for an applet? Do I have to create a window the size
> of the entire screen?
Probably. I believe MouseMoved events only occur when the mouse moves
over a component that you "own".
> But then doesn't the applet lose focus?
Possibly, but what's the problem with that? The JWindow would have
focus, and you can move whatever code you had in Applet to the JWindow
instead.
> Any help
> would be appreciated.
As a last resort, you might do something fancy with the Robot class,
taking screenshots and using AI to try to figure out where the mouse cursor
is.
- Oliver
andrewthommo@gmail.com - 27 Apr 2006 07:18 GMT
> Sub: How to capture mouseMoved events for whole screen?
> How do I do this for an applet?
Please repeat the gist of the subject in the body
of your post, as some people do not notice subject lines.
>..Do I have to create a window the size
> of the entire screen?
A (J)Window can be launchd directly from an applet.
If the applet is not signed (and accpepted as trusted)
any free floating window will have the message 'Java Applet Window'
(or words to that effect) across the bottom.
>..But then doesn't the applet lose focus? Any help
> would be appreciated.
What end effect are you trying to achieve? What is the
point of what you are doing? Until I understand that, I am
unable to help further.
Andrew T.