XP Look and Feel - beta

Importance notice:
I'm no longer developing this look and feel actively. Starting with Sun's JDK 1.4.2 there's an official xp look and feel that I consider - especially in conjunction with winlaf - as a better solution to give your applications an acceptable look on the windows platform. I'll leave it online - maybe somebody still can use it as a basis for a new look and feel...

Main goals of the XP look and feel:

Bridge the gap between native and swing applications.

Show that swing does not at all prevent nice GUIs! (If you feel that xp does not look good someone else has will have to prove this ;-)


Warning: Due to the license the look and feel runs only on windows(TM) xp. See license for details.


Some screenshots of Java(TM) Components:





The XP look and feel was developed during the last months in my spare time. It started as an extension to the beautiful metouia look and feel by Taoufik Romdhane but soon became a skinned look and feel for the most, but not all, java components. So in some way it might be considered as just another skinned look and feel. The difference lies therein, that the main goal of the xp look and feel is to be as close to the look and feel of native xp components as possible. Thus painting is done the most appropriate way using either skins or standard code. There's no attempt to provide a configuration file to implement new look and feels in a declarative manner. If you want to have something like that you better take a look at skinlf.

Some words about the source code:

Sun doesn't help us much creating custom look and feels. Sooner or later you run into classes that have package or private visibility but need to be accessed from your code. This leads to copy-and-paste programming and ugly hacks. By now, I hope you feel prepared that the source code isn't beautiful and won't find its way into a book about object oriented design...

If you want to contact me just drop a mail to Stefan.Krause@gmx.at.


Download the XP look and feel:

Only for windows(TM) xp: Run a modified Java(TM) SwingSet via Java(TM) WebStart. It won't run on anything but windows XP!

Download the the zipped sources and the library.

See some more screenshots.


To use the look and feel for in your project just add the line UIManager.setLookAndFeel("com.stefankrause.xplookandfeel.XPLookAndFeel"); at the very beginning of your main method.

If you want to apply the look and feel for a third party app you can use the Launcher class. Let's take the SwingSet2.jar as an example. Go to $JAVA_HOME/demo/jfc/SwingSet2 on your command line, copy the xplookandfeel.jar into the current directory and run the application with java -cp xplookandfeel.jar;SwingSet2.jar Launcher SwingSet2.



The source code (except the files or methods mentioned below) of the look and feel is released under the LGPL (GNU Lesser General Public License).

Some methods are marked as SUN proprietary, the LGPL does not apply for those methods.

As I don't have the monetary resources to find out whether Microsoft is fond of XP look and feels for Java(TM) all icons and graphics included in the look and feel are copyrighted by Microsoft(TM). Those files must be used on windows xp only.

To assure that it works on xp only there's a runtime check in the method isSupportedLookAndFeel in XPLookAndFeel.java. It'll check that the system property os.name is equal to "Windows XP". You are neither allowed to remove or alter this check nor allowed to use this look and feel if you change the os.name property.