So my question is, given a graphic (image) in Java which I place within a panel etc. how could I (if i can at all) store certain positions on the graphic then during run time draw something on the graphic at the positions i pre-defined.
e.g. I have a map, I programmatically define certain spots on the map (using the x and y coordinate of the point of the graphic) then during runtime say the user selected as place on the map e.g. a shop, a pointer is drawn onto the point pre-defined as the shops location.
I am trying to keep things simple so I dont need some complex implementation which uses Google Maps API etc.
I am not sure on how to do this in Java, any guidance would be greatly appreciated.
Thank you!
P.S This question has been marked as duplicate by one of the moderators, here is how it is different.
I am not sure how to store the specific coordinates of the certain locations within the graphic rather than drawing things with the mouse. So if the shop is at point (45,89), how would I go about drawing a image at point (45,89).
Thanks again.