Java – place JMenu on the MAC menu bar

I am using swing JMenu to create a Java application on Mac I want to use the menu bar at the top of the screen, but it continues to put the menu bar on the frame itself How do I move the menu bar to the top of the screen on my Mac?

Solution

You can set the system property to do this http://developer.apple.com/library/mac/#documentation/Java/Reference/Java_PropertiesRef/Articles/JavaSystemProperties.html The first example mentioned the use of system setProperty(“apple.laf.useScreenMenuBar”,“true”); Place the menu in the menu bar

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>