OfficeLnFs - Microsoft Office XP & 2003 Look and Feels for Java Swing

This project provides a single jar file that you can add to your Java Swing applications to enable Look and Feels modeling the following popular Microsoft applications: Of course, your Swing application MUST be running on a Windows box to use these LnFs. The reasons for this are twofold: first, the LnFs are built upon the standard Windows Look and Feel, which is available only in Windows JRE's, and second, I'm not too sure about the legal ramifications of copying Windows applications' look and feels/icons/etc. on other platforms.

The jar provides three look and feels. You can have your application use one of them by adding the following code to the beginning of your application:

      try {
         UIManager.setLookAndFeel("org.fife.plaf.Office2003.Office2003LookAndFeel");
         //UIManager.setLookAndFeel("org.fife.plaf.OfficeXP.OfficeXPLookAndFeel");
         //UIManager.setLookAndFeel("org.fife.plaf.VisualStudio2005.VisualStudio2005LookAndFeel");
      } catch (Exception e) {
         System.err.println("Oops!  Something went wrong!");
      }
   
This will set the UI for all modified components, just like any other Look and Feel.

The jar also contains the icons used by Office XP and 2003 applications; they are located in the following directories:

      org/fife/plaf/OfficeXP
      org/fife/plaf/Office2003
   
These are standard images, including:

Office XP Office 2003 Location Office XP Office 2003 Location
About about.gif Back back.gif
Close close.gif Close All closeall.gif
Copy copy.gif Cut cut.gif
Delete delete.gif Find find.gif
Find Next findnext.gif Forward forward.gif
Help help.gif New new.gif
Open open.gif Open in new window openinnewwindow.gif
Options options.gif Paste paste.gif
Print print.gif Print Preview printpreview.gif
Redo redo.gif Replace replace.gif
Replace Next replacenext.gif Save save.gif
Save All saveall.gif Save As saveas.gif
Select All saveall.gif Undo undo.gif

All are in .gif format, are 16x16, and have transparent backgrounds. So, for example, you could create a "cut" toolbar button as follows:

      ClassLoader cl = getClass().getClassLoader();
      URL url = cl.getResource("org/fife/plaf/OfficeXP/cut.gif");
      JButton cutButton = new JButton(new ImageIcon(url));
   

Here are some images of a real application that uses these look and feels:

Office XP Look and Feel. Notice the menu style, colors, and icons. Office 2003 Look and Feel. Notice the colors, rounded and gradient toolbar, and icons. Visual Studio 2005 Look and Feel. Basically a palette-swapped Office 2003 Look, but with a new, cooler looking tabbed pane.


Software using the Office Look and Feels:

If you use the look and feels in any project, please email me at robert_futrell@users.sourceforge.net and let me know! I'll provide a link to your project from the OfficeLnFs page if you like.

To try out the Office Look and Feels, please download from the Sourceforge project page. Also, please report any bugs or configuration problems you find there as well.

The Office Look and Feels are distributed with a BSD-style license. This means that you can use it in your own applications, even commercial ones, without having to worry about open-sourcing your project. All I ask is that you include the OfficeLnFs license with your project and mention your using OfficeLnFs in your documentation somewhere.