diff options
Diffstat (limited to 'javax/swing/JPopupMenu.java')
-rw-r--r-- | javax/swing/JPopupMenu.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/javax/swing/JPopupMenu.java b/javax/swing/JPopupMenu.java index d46015afd..2e59d4767 100644 --- a/javax/swing/JPopupMenu.java +++ b/javax/swing/JPopupMenu.java @@ -820,7 +820,14 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement */ public void menuSelectionChanged(boolean changed) { - if (! changed) + if (invoker instanceof JMenu) + { + // We need to special case this since the JMenu calculates the + // position etc of the popup. + JMenu menu = (JMenu) invoker; + menu.setPopupMenuVisible(changed); + } + else if (! changed) setVisible(false); } |