Win a copy of The Java Performance Companion this week in the Performance 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