minuit

MenubarComponent

Menus across the top of a screen.

Java

Inside a PanelComponent constructor. The same call draws in every family and chroma.

Java
MenubarComponent bar = add(new MenubarComponent(at(new Box("bar", 0, 0, 300, 14)), this)
        .menu("File",
                Item.action("New", this::create).icon(Icon.PLUS).shortcut("Ctrl+N"),
                Item.separator(),
                Item.submenu("Recent", Item.action("Survival", this::openSurvival)))
        .menu("View", Item.check("Grid", grid, on -> grid = on)));
// ... the other widgets ...
add(bar.popup()); // last

Open

MenubarComponent, open