This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with mouseMoved method

 
Eoin Mac Aoidh
Ranch Hand
Posts: 48
  • 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
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a million! Well spotted.

E
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic