• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get location of mouse click with respect to picture?

 
shahidrasul shahid
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i use a jlabel with image. i want when i click on image it give me location, where i click with respect to image not screen.

picture is also scroll able (big) .


please some body help me.
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Events of a MouseListener added to the JLabel will report mouse coordinates in the coordinates of the label.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic