XMenuBar is derived from JMenuBar and can be used like a regular menubar. Use XMenu for toplevel menus and XMenuItem and XSubmenuItem as child elements for XMenu. The child elements of XSubmenu can also be regular Swing menu elements (i.e. JMenu, JMenuItem).

All relevant lines are highlighted. Press the "Run..." button to start the example.