Am I missing something? I cannot find any place in official Java documentation that says that clicking a toggle button toggles its selection state, or how one would suppress that behavior if desired. ToggleButtonModel is conspicuously undocumented.
I suppose it should be obvious, but it is not when one wants to have a checkbox menu item whose behavior is fully specified by its action. It seems a bit surprising that the button state has been toggled before the action listener is called.
