What is it?
Missing Preview Image

OfficeLnFs is a Swing LookAndFeel suite that mimics Microsoft Office-style applications as closely as possible. It currently includes three different LookAndFeels that simulate Office 2003, Office XP, and Visual Studio 2005.

The Looks detect Windows' current theme, and use colors that mimic what the real Office applications would use in that theme.

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. Sending us a note letting us know would be nice as well!

How to Use

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 {
} catch (Exception e) {
   System.err.println("Oops!  Something went wrong!");

This will set the UI for all modified components, just like any other LookAndFeel.

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

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("icons/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.
Quick Links