Once you have created a menu bar, you attach it to a target, a JApplet instance or a JFrame instance, using setJMenuBar:
JApplet
JFrame
setJMenuBar
setJMenuBar(a menubar);