In my program in java, I have drawn these polygons in my JFrame and I want my mouse cursor to change to the one that I click on it, so by clicking again, the polygon will be drawn in the point of my click. I don’t know how to do that since I don’t know how to change my cursor to a polygon?
Share
You want to create a custom cursor. The method to create and register that cursor is toolkit.createCustomCursor. Basically, create an image with an appropriate size, install it and use as needed. Here’s a code snippet: