void setMenuBar ( MenuBar menuBar ) { if ( this . menuBar != null && menuBar != null ) throw new IllegalStateException ( "Menu was already added to MenuBar" ) ; this . menuBar = menuBar ; }
Called by MenuBar when this menu is added to it