About the Metal L&F
Metal is a cross-platform look & feel being provided by Javasoft.
Here is some information about metal you might find useful.
The Metal L&F implements all of the basic Swing functionality,
but also extends it in several areas including:
-
Themes
-
Sliders
-
Toolbars
Themes
One of the first things we learned while implementing the Metal L&F
was than many developers feel very strongly about how colors are used in
their software. To help accommodate this we created a Theme mechanism
which allows a developer to easily specify the default colors, fonts and
icons used by the L&F.
The metal theme mechanism is designed to allow developers to create
their own themes. For an example of this, see the themes
which are included with the Metalworks demo. Note that like all of the
L&F packages, the Metal package is not yet frozen and the theme mechanism
may change as we get developer feedback on how to improve it.
Sliders
There are several areas where the Metal L&F introduces some optional
"value-added" features above the base line capabilities of swing.
One is the option of Filled Sliders. These are ideal for things like
volume controls. To access the Metal "value-added" features you
pass in a token to the component's putClientProperty method. Here
is an example:
JSlider slider = new JSlider();
slider.putClientProperty("JSlider.isFilled", Boolean.TRUE);
Note that if a UI such as Windows or Motif encounters a property such as
JSlider.fill which is does not understand that property will be ignored.
Thus you don't have to worry about problems which could arise if you switch
to a different L&F.
ToolBars
Many popular applications support "roll-over" effects on buttons in toolbars.
The Metal L&F provides an easy way to do this. Here is
a code snippit:
JToolBar toolbar = new JToolBar();
// add your buttons here
toolbar.putClientProperty("JToolBar.isRollover", Boolean.TRUE);
This will remove the borders from around all the buttons in the tool
bar, and only show them when the mouse is over a given button. This
is a nice effect for many applications.