JPopupMenu, adding menu items.
When I add menu items, they don't show up when I hover over the menu in the JPopupMenu
Code:
JPopupMenu p = new JPopupMenu("Menu");
JMenu menu = new JMenu("File");
static JMenuItem close = new JMenuItem("Close");
Code:
p.add(menu);
menu.addSeparator();
menu.add(close);
Re: JPopupMenu, adding menu items.
Why on earth is the MenuItem static? Chances are it's been added to some other container or even the same popup in another instance of the class, and that's why it's not showing.
db