if (this.menuBar != null) this.menuBar.removeNotify();
  public synchronized void setMenuBar(MenuBar menuBar)  {  if (peer != null)  {    if (this.menuBar != null)      this.menuBar.removeNotify();      if (menuBar != null)      menuBar.addNotify();    invalidateTree ();    ((FramePeer) peer).setMenuBar(menuBar);  }    menuBar.frame = this;  this.menuBar = menuBar;  }