This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes problem with mouseMoved method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "problem with mouseMoved method" Watch "problem with mouseMoved method" New topic
Author

problem with mouseMoved method

Eoin Mac Aoidh
Ranch Hand

Joined: May 19, 2005
Posts: 48
Hi. My mouseMoved method dosnt seem to be registering at all, and I cant figure out why not! Heres what Ive got:


All the methods print out as they should, but mouseMoved and mouseDragged seem to be ignored.

I add the mouseListener to my "browser" (which I made by adding a JEditorPane into a JScrollPane)

Any help much appreciated,
Thanks,

Eoin.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> I add the mouseListener to my "browser"

did you also add a mouseMotionListener to the browser?
Eoin Mac Aoidh
Ranch Hand

Joined: May 19, 2005
Posts: 48
Thanks a million! Well spotted.

E
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: problem with mouseMoved method
 
Similar Threads
Motion listener hangs while mouse button is pressed
setBounds() does not work????
setBounds() does not work????
Simple Swing question about event handling threads
KeyListener problem