Skip to content
Advertisement

Tag: jmenubar

Making a JFrame with a JMenuBar open in fullscreen

I have a JFrame that I want to add a menu bar to and then have that JFrame automatically open in fullscreen. If I just make a JFrame and set it to fullscreen with f.setExtendedState(f.getExtendedState()|JFrame.MAXIMIZED_BOTH ); that works fine: However, once I add a JMenuBar to that JFrame it will no longer open in fullscreen: What could be the cause

Swing application menu name not displaying correctly in Java 1.8

Okay, so I’ve done Swing applications before, and I know if you want to display a different name for the application menu (the one on Macs that usually have a “Preferences” and “Quit” option), you have to use: System.setProperty(“com.apple.mrj.application.apple.menu.about.name”, “App name”); and it must be executed before the JFrame is created. I’ve done this, but it continues to show my

Advertisement