Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2006

Tip: Looking for answers? Try searching our database.

How to capture mouseMoved events for whole screen?

Thread view: 
Ron - 26 Apr 2006 13:57 GMT
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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.