Home

Germán Blando

The Swing graphical library allows to work with several Look and Feels (L&F). But from the user's point of view, there is not a standardized way to choose what is the preferred Look and Feel. Therefore, each application have to offer its own configuration method. This issue becomes tedious for developers and inconsistent in platform terms.

Java Look and Feel Selector is a utility that makes it possible to do just that: select a default Look and Feel similar to how the visual preferences are set in any other Operating System. In addition, it can offer supplementary configuration details for some L&Fs. For example, for Metal it is possible to make a global correction in the font size, in order to optimize the visualization in displays with high pixel density.

Developers can incorporate Java Look and Feel Selector along with their own applications, although it is compiled as an independent multiplatform executable. Then each application can apply the Look and Feel previously selected by the user by following two simple steps:

  1. Include in your classpath two Jar files: efBase.jar and lookAndFeels.jar
  2. Call a simple static method at the beginning of each application, before starting any GUI element:

ClsLafManager.setDefaultLookAndFeel();

And that’s all. All your Swing desktop applications will look and feel consistently.

The wiki uses Markdown syntax.