I am trying to make a simple game of Craps in Java. My idea was to have a JFrame with an image of the Craps betting table as the background image and when the player clicks on a section of the table they can place or remove a bet on that part of the table.
My question is, when the user clicks, what is the best way to determine what part of the image has been clicked? Obviously I need a MouseListener to determine where in the JFrame the click has occurred, but how can I transfer this to the position on the image? I am not looking for code, just a plan of attack really, so any thoughts would be appreciated.
Thanks in advance for any help on this,