if (bar == null) setMenuBarPeer (null); else setMenuBarPeer ((MenuBarPeer) bar.getPeer ());
if (bar == null && menuBar != null) { removeMenuBarPeer(menuBar); menuBar = null; insets.top -= menuBarHeight; menuBarHeight = 0; awtComponent.doLayout(); } else if (bar != null) { if (menuBar != null) removeMenuBarPeer(menuBar); menuBar = (MenuBarPeer) ((MenuBar) bar).getPeer(); setMenuBarPeer(menuBar); }
  public void setMenuBar (MenuBar bar)  {    if (bar == null)      setMenuBarPeer (null);    else      setMenuBarPeer ((MenuBarPeer) bar.getPeer ());  }