• Post Reply Bookmark Topic Watch Topic
  • New Topic

How can i have a picture as a background and have coordinate on that picture using Java ?

 
motress zlting
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i have a picture as a background and have coordinate on that picture using Java ?
i have done the browse and display picture function in my laptop, but now i don know how can i set a coordinate for
that picture ? However, that coordinate should be invisible to user , so when mouse move over the picture ,it shows the coordinate .
That is really difficult for me as i'm newbie in java .... Someone please help me.......
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://faq.javaranch.com/java/BackgroundImageOnJPanel

You will need a MouseMotionListener. On the mouseMoved you can get the mouse coordinates and display them as a tooltip.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!