Hey guys!
I’ve got a little problem and I’d like to seek your advice on it. I have a few circles (Ellipse2D.Float) drawn to a JPanel. Those circles should change their size/color when the mouse hovers over them or the player clicks on them, but I can not figure out how to implement it.
All the circles have their fixed location while the panel’s dimension is also fixed at 600*600.
I’ve tried two things so far, my first idea was to use MouseInfo’s getPointerInfo() to check if any circle contains the current location of the cursor, but I don’t really like that solution. I also tried to create a custom event, but I had never done it before and I couldn’t make it to work.
How would you implement it?
Thank you in advance!
zilik