How can I get the mouse position even when an event hasn't been performed, eg. I haven't clicked or left window, etc. Kind of like mousing over something. I am currently using a class that implements MouseListener, MouseMotionListener for events such as clicking and releasing but I would like a mouseover ability as well.
fmasroor
0
Newbie Poster
Recommended Answers
Jump to PostMouseListener has methods for MouseEntered/MouseExited that you can use for mouseover handling.
Jump to PostYes. Use MouseEntered/MouseExited. If you want more detail while its moving inside the window use mouseMoved.
Just try it!
Jump to PostYou should be getting many calls to your mouseMoved method as part of ypur MouseMotionListener
All 11 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
fmasroor
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
fmasroor
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
fmasroor
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
fmasroor
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
fmasroor
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.