GUI Commands 2.0 has arrived! Find out what's new and improved.
Button and Menu Styles

The Mac has different conventions from most other platforms for rendering buttons and menus.  GUI commands now respects these preferences and automatically renders menus and buttons accordingly.

Menu Rendering

GUI Commands automatically removes both icons and mnemonics from all menus when running on the Mac.  This means there's no need to manually clutter your configuration files with include-if conditionals to achieve this standard behavior.  The following examples show how the exact same face configurations are rendered on Windows and the Mac.

                  

It is possible to globally enable mnemonics on menus by configuring the static properties of the MacFaceRenderer class.  The following example demonstrates how to do so.

   MacFaceRenderer.setMenuMnemonicsEnabled(true);

Button Rendering

GUI Commands now also ignores mnemonics when configuring button on the Mac. Unlike menus, button icons are still rendered normally. Please note that there are some issues with Apples Aqua look and feel with certain button configurations (namely with text positioned under the icon) and you may want to consider using GUI Commands with the Quaqua look and feel if you need this capability.

It is possible to globally enable mnemonics on buttons by configuring the static properties of the MacFaceRenderer class. The following example demonstrates how to do so.

   MacFaceRenderer.setButtonMnemonicsEnabled(true);

Controlling Button Styles

The Aqua look and feel allows control over the appearance of buttons by using the client properties of Swing components. GUI commands now allows you to specify client properties to control the appearance of buttons on the Mac. The following examples of configuring the Aqua JButton.buttonType property.

<face>
   <text>Push Me</text>
   <client-property name="JButton.buttonType">toggle</client-property>
</face>

The list of valid styles is covered in the Java Development Guide for Mac OS X.

While the JButton.buttonType property is useful, a much greater level of control over button styles can be achieved using GUI Commands with the Quaqua look and feel.