• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Menu bars on a Mac

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Javaranchers! Again, I'm turning to you for help. Here is the situation:

I have an application written using the NetBeans IDE. In the main() method, the first instructions I have:

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
System.setProperty("apple.laf.useScreenMenuBar", "true");
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "ICONS Character Folio");

So far, so good. The application looks like a Mac application, there is a menu bar on the top of the screen, etc.

The problem is that the original menu bar is still there.

How can I remove or hide the original menu bar without messing up the Mac menu bar?

Thanks!
 
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you run it through the Jar Bundler ?
 
Daniel Gallant
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, not yet. My Mac-foo is weak and I assumed I only had to add those lines of code.

I'll give it a try!

Thanks!
 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());


I think this is not necessary. On Apple's Java, Aqua is the default look-and-feel.

System.setProperty("apple.laf.useScreenMenuBar", "true");


I think this one is deprecated in favor of com.apple.macos.useScreenMenuBar; see http://developer.apple.com/legacy/mac/library/#technotes/tn/tn2042.html for details.
 
I am a man of mystery. Mostly because of this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!