How to capture mouseMoved events for whole screen?

R

Ron

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
 
O

Oliver Wong

Ron said:
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
 
A

andrewthommo

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top