File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes JMenuBars on Mac OS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JMenuBars on Mac OS" Watch "JMenuBars on Mac OS" New topic
Author

JMenuBars on Mac OS

Olivier Legat
Ranch Hand

Joined: Nov 17, 2007
Posts: 176

Hello everyone.

I'm new to programming on Macs and I always did something like so on Windows/Linux to obtain a menu bar:

Evidently it works on Macs too but not quite how I want it. The Menu bar appears inside the window as oppose to on the same bar as all the other application. In other words, I want my menus to appear on the same bar as the one with the apple logo, because that's what Mac users are use to. Does anyone know a way of doing this and yet insure my program with still works on Windows/Linux as if nothing was changed.

Thank-you


Olly
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
It's as easy as setting a system property. See "Using a Macintosh Menubar" in http://developer.apple.com/legacy/mac/library/#technotes/tn/tn2042.html. The MacOsxFaq links to more useful resources on how to make a Java app more Mac-like.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10175
    
    8

Use a Jar Bundler and check the "Use Mackintosh Menu Bar"
http://developer.apple.com/library/mac/#documentation/Java/Conceptual/Jar_Bundler/About/About.html#//apple_ref/doc/uid/TP40000884-CH202-BAJCICAA


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Olivier Legat
Ranch Hand

Joined: Nov 17, 2007
Posts: 176

Thank-you all Those links will prove very helpful to me.

Cheers
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMenuBars on Mac OS
 
Similar Threads
Survey- What platform do you use to program in Java?
Basics of Mac OS
Java on Mac OS
JMenuBar problem in MAC
JPopupMenu and full screen, Mac OS 10.4