This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 146317 [details] An example Action exhibiting the bug See the attached example. Actions.connect(JMenuItem, Action, boolean popup) fails to keep the JMenuItem up to date with the state of the Action in the case where popup == false. The bug seems to be in Actions.MenuBridge.prepare(), where addNotify() is called only if the "popup" parameter is true, based on the assumption that "popups generally get no hierarchy events" (according to a comment in MenuBridge.prepare() ). This is true, but also seems to be true for items in the main menu. Maybe it's a MacOS thing? With the above understanding of the bug, a workaround is to do "menuItem.putClientProperty("ancestor", new JMenu("FakeMenu"));" after invoking Actions.connect. But it would be nice to have this fixed in general. Proposed fix: call addNotify() regardless of the value of popup in Actions.MenuBridge.prepare(). A possibly related bug: https://netbeans.org/bugzilla/show_bug.cgi?id=70731
Your example works fine on my Windows 7. I'll try to reproduce it on MacOS as you suggested.