menu

inline fun menu(name: String = "", body: MenuBuilder.() -> Unit): JMenu

Create a menu with the given name and entries, which can be null to indicate a separator, a JMenuItem, or an Action to wrap in a JMenuItem.

Return

A new JMenu.

Parameters

name

The name of the menu to create.

body

A function that adds entries to the menu via the MenuBuilder syntax.