Béatrice Cassistat
Béatrice Cassistat

Reputation: 1078

Custom Application Menu in Mac OS X

I manage to make Mac OS X Application Menu work on Java using com.apple.eawt API and added handlers for "About App", "Preferences..." and "Quit App" menu item.

But is it possible to add some custom menu option in this Application Menu in Java?

By example, Safari have "Report Bugs...", "Block Pop-Up", "Private Browsing...", etc. :

alt text

Any idea ?

Upvotes: 4

Views: 1356

Answers (1)

trashgod
trashgod

Reputation: 205785

The OSXAdapter example application shows how to do this.

Addendum:

it looks like it only defines About/Preferences/Quit handlers

Yes, Services and Hide/Show are supplied by the system. It sounds like you want to add menu items between Preferences and Services. Unfortunately, I've not tried that. You might look in com.apple.eawt for alternatives. I can see it would be convenient; but for reference, NetBeans, Eclipse, et al. use the existing functionality.

Upvotes: 3

Related Questions