This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
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: 5167
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
Boost this thread!