Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't see separators on Jmenu



I'm pretty sure the Aqua L&F doesn't currently provide a UI
implementation for menu separators that matches native Aqua.  This
would be the reason for why they show up as empty space rather than a
line like you would expect.  Using the "Screen Menu Bar" as suggested
in previous posts doesn't suffer from this problem because native
separator components are created.

Josh

On 9/12/06, Greg Guerin <email@hidden> wrote:
David Leader wrote:

>I've a number of apps I've written using AWT with menus with separators
>that look fine on OSX.

So do I, but AWT Menubar and Menu are different classes than Swing JMenubar
and JMenu.

Also, the top-of-screen menubar is not the same as the in-window menubar.
I just tested the screen JMenubar and it worked: Mac OS 10.4.7 ppc or i386,
Java 1.4.2_09 or 1.5.0_06.

However, when I reconfigure the same app to use an in-window JMenubar,
separators appear only as gaps, not as lines, exactly as you've described.

The in-window JMenubar and JMenus are implemented using popup-menus (see
Sun's source), for which separators are known to not work on Mac OS X, not
even in 1.5.0_06.

The remedy is to use an AWT Menubar, or use a Swing JMenubar in
top-of-screen mode.  The latter is controlled by setting
"apple.laf.useScreenMenuBar" property to true, or the older
"com.apple.macos.useScreenMenuBar".  Both properties are honored in 1.4 or
1.5, and the resulting state is the OR of the two boolean values.


>Could it be something to do with the way I'm compiling? But, if so, why >should it work on Windows?

Windows doesn't have the separator bug.  Only Mac OS X does, and only on
in-window Swing JMenubars.

  -- GG


_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.