How to write a MouseListener[
^]
That also suits an image, as that is also just a component.
When detecting a certain area in an image, it needs to have a defined thingy on which one can recognize it.
That might be a certain mouse position, a certain color value at that position or, as you already mentioned, an overlay which defines so.
You might get along with the color value. So if you figure, which color is set in the image at the position the mouse event happens...
Have fun!