aspose 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
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: 10535
    
    9

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