summaryrefslogtreecommitdiff
path: root/javax/swing/JPopupMenu.java
diff options
context:
space:
mode:
Diffstat (limited to 'javax/swing/JPopupMenu.java')
-rw-r--r--javax/swing/JPopupMenu.java9
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);
}