if (menu.parent != null) menu.parent.remove(menu); menu.parent = this;
MenuContainer parent = menu.getParent(); if (parent != null) parent.remove(menu); menu.setParent(this);
  public synchronized void setHelpMenu(Menu menu)  {  if (helpMenu != null)    {        helpMenu.removeNotify();      helpMenu.parent = null;    }  helpMenu = menu;  if (menu.parent != null)      menu.parent.remove(menu);  menu.parent = this;    MenuBarPeer myPeer = (MenuBarPeer) getPeer ();    if (myPeer != null)    {      menu.addNotify();        myPeer.addHelpMenu(menu);      }    }