Search code examples
javaswinggeotools

Reset cursor of jmappane


There is the standard zoom tool on the left where you can click and the cursor on the mappane changes to the same icon as the tool. I have implemented two other zoom buttons which should reset the cursor icon to the default icon. Where can I find the method or the class which can handle this? (By reset I actually meant it should deactivate the clicked tool again)

I extended the ZoomOutAction and ZoomInAction classes.

enter image description here


Solution

  • Instead of extending ZoomInAction or ZoomOutAction you need to extend from NoToolAction. That's it.