This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Add mouselistener to an image

 
Demith Waruna Samaraweera
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an application where a Label is added on a LScrollPannel and my image is loaded on to the JLabel. I want add mouseMotionLisener to image loaded in the JLabel, and also change the origin coordinates
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't add it to the image. You have to add it to a component, like, JLabel.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic