aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/awt/PopupMenu.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/awt/PopupMenu.java')
-rw-r--r--libjava/java/awt/PopupMenu.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/libjava/java/awt/PopupMenu.java b/libjava/java/awt/PopupMenu.java
index cde79e3..83ffb35 100644
--- a/libjava/java/awt/PopupMenu.java
+++ b/libjava/java/awt/PopupMenu.java
@@ -105,7 +105,7 @@ PopupMenu(String label)
public void
addNotify()
{
- if (peer != null)
+ if (peer == null)
peer = getToolkit ().createPopupMenu (this);
super.addNotify ();
}
@@ -123,6 +123,8 @@ addNotify()
public void
show(Component component, int x, int y)
{
+ if (getPeer() == null)
+ this.addNotify();
PopupMenuPeer pmp = (PopupMenuPeer)getPeer();
if (pmp != null)
{