Ok, I'm stumped. I've searched the 'net but found nothing... probably because no one else in the world has ever encountered this issue.
The situation is that I've got a few menu items that I want to share between an edit menu (in a jmenubar) and a popup menu. I build the popup menu first, then add the menu bar. Here's the 'issue' part: when I add the shared menu items to the edit menu, they are removed from the popup menu.. AND, only one is added to the edit menu (where, for example, there are 4 menu items that I'm adding). What in the world is happening? Below is a runnable example that just prints out the number of items in the menus to show my point.
You can use Action objects (hint: extend AbstractAction) to do all the hard work. These Action objects can be shared among multiple user interface components; buttons, menu items, basically anything that can accept an Action.
If you then disable this single shared Action object, all components that are created with it will also get disabled.