Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JPopupMenu with a submenu (doesn't work)

843804Jan 18 2005 — edited Jul 30 2008
I have a JPopupMenu that displays some info for me and I would like to add a submenu but it doesn't seem to work. I can successfully add the submenu but it doesn't "expand" when I mouse over the submen.
JPopupMenu pm = new JPopupMenu();
...
JMenu submenu = new JMenu("submenu");
JMenuItem jmi = new JMenuItem(...);
submenu.add(jmi);
...
pm.add(submenu);
The popup menu looks as it should and the only thing that is missing is the action that should expand the submenu when I mouse over (and clicking doesn't work either).

Any ideas?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 27 2008
Added on Jan 18 2005
10 comments
721 views