This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with mouseMoved method

 
Eoin Mac Aoidh
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> I add the mouseListener to my "browser"

did you also add a mouseMotionListener to the browser?
 
Eoin Mac Aoidh
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a million! Well spotted.

E
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic