Split image into clickable regions
Is there any way to split an image to region (right now it's JLabel but I can change it if necessary)? I use swing in my program and I have an image (square for this example) with some triangles, stars and trapezoids inside it (it can be JPG, PNG, etc). The idea is that the user will click inside one of those shapes and then I will put another small icon on top of the area the user clicked. The user can click on multiple areas but at the end of the day, I need to know which shapes were clicked. Seems possible anyone? David Kroukamp Have a look at what I have made: This is the image I used for