I want to make a JPopupMenu that appears at a left click. I already have a suitable JMenu in my JMenuBar, so I used the getPopupMenu method as follows:
Java Code:
JPopupMenu popup = myMenu.getPopupMenu();
//myMenu is my existing JMenu
So then when I left click, the new JPopupMenu appears with all the correct JMenuItems. But I can't click on any of them - I don't even get a response from hovering over them... If, however, I do the following, with everything else exactly the same:
Java Code:
JPopupMenu popup = new JPopupMenu();
popup.add("A menu item");
It then works perfectly...