I am very new to Java Swing, and I am working on an assignment. I have some polygons on my component. When I entered in to a polygon it has to highlight (i.e. filled with some color).
When I go to next polygon it has to highlight and previous one should be erased (i.e normal state). I found some examples but those are using "mousepressed" events, but mine is different.