question: public void addItem ( MenuItem item ) { XMenuItemPeer mp = ( XMenuItemPeer ) item . getPeer ( ) ; if ( mp != null ) { mp . setContainer ( this ) ; synchronized ( getMenuTreeLock ( ) ) { items . add ( mp ) ; } } else { if ( log . isLoggable ( PlatformLogger . Level . FINE ) ) { log . fine ( "WARNING: Attempt to add menu item without a peer" ) ; } } updateSize ( ) ; }
target:  Adds item to end of items vector. Note that this function does not perform check for adding duplicate items