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 ad开发者_StackOverflowded 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. :

Any idea ?
The OSXAdapter example application shows how to do this.
Addendum:
it looks like it only defines
About/Preferences/Quithandlers
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.
加载中,请稍侯......
精彩评论