Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "problem with mouseMoved method" Watch "problem with mouseMoved method" New topic

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,

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.

I agree. Here's the link:
subject: problem with mouseMoved method
It's not a secret anymore!