Search code examples
javaswingjframejmenubar

Eliminating dropdown menu from JMenu set by setJMenuBar


If you create a JMenuBar for a JFrame in the usual way, this JMenuBar has an application menu with menu items Move, Size, Minimize, and so on as pictured below.

image of JMenuBar application menu

You get to this menu by clicking on the little Java coffee cup in the upper left-hand corner.

Is there a way to create a JMenuBar without access to this application menu?


Solution

    • Top-Level Containers came from Native OS, where all Containers have got the same decorations and ToolBar with Buttons, with identical behaviour,

    • AFAIK not possible as I know, without implementing Custom Look and Feel, e.g some Substance themes have got own customized ToolBar

    or

    • you can create un_decorated JFrame / JDialog and then to create own ToolBar and/or Buttons for iconify, maximize and close