diff options
Diffstat (limited to 'libjava/java/awt/MenuBar.java')
-rw-r--r-- | libjava/java/awt/MenuBar.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libjava/java/awt/MenuBar.java b/libjava/java/awt/MenuBar.java index fb26729..1c9b1c78 100644 --- a/libjava/java/awt/MenuBar.java +++ b/libjava/java/awt/MenuBar.java @@ -128,15 +128,15 @@ setHelpMenu(Menu menu) helpMenu.removeNotify (); helpMenu.parent = null; } + helpMenu = menu; if (menu.parent != null) menu.parent.remove (menu); - if (menu.parent != null) - menu.parent.remove (menu); menu.parent = this; if (peer != null) { + menu.addNotify(); MenuBarPeer mp = (MenuBarPeer) peer; mp.addHelpMenu (menu); } @@ -163,8 +163,7 @@ add(Menu menu) if (peer != null) { - MenuBarPeer mp = (MenuBarPeer) peer; - mp.addMenu (menu); + menu.addNotify(); } return(menu); @@ -269,6 +268,11 @@ addNotify() Menu mi = (Menu)e.nextElement(); mi.addNotify(); } + if (helpMenu != null) + { + helpMenu.addNotify(); + ((MenuBarPeer) peer).addHelpMenu(helpMenu); + } } /*************************************************************************/ |