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 / February 2007

Tip: Looking for answers? Try searching our database.

Java Timer suggestions needed

Thread view: 
Kaish - 18 Feb 2007 16:44 GMT
Hello all,

I'm coding an application that tracks mouse movements (using
mouseListener and mouseMotionListener). I want to be able to time how
long a cursor remains on a certain component - for example, how long a
user keeps his cursor over a button.

Any suggestions on how to go about this?

Thanks.
Knute Johnson - 18 Feb 2007 17:24 GMT
> Hello all,
>
[quoted text clipped - 6 lines]
>
> Thanks.

Sure.  There is a MouseEvent generated every time you enter and exit a
component with the mouse.  Write a MouseListener that records the time
on enter and subtract that from the time on exit.

Signature

Knute Johnson
email s/nospam/knute/



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



©2008 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.