LAF : Java Glossary

go to home page L words local find full screen, hide local find menu Google search web for more information on this topic jump to foot of page translate this page with Babelfish 2008-08-19 by Roedy Green ©1996-2008 Canadian Mind Products
index page for letter ⇒ punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all)
LAF
Look And Feel. Swing has programmable look and feel. It can be made to look like Motif, Mac etc.
Mac L&F Discovering Active L&Fs Gotchas
Selecting Programmatically Decorating Learning More
Command Line Icons Books
Discovering Installed L&Fs Overriding Links

Mac L&F

The Mac LAF is disabled except for Mac platforms. This is restriction is fairly easy to defang so that you can test your multi-platform code, without buying Mac. Just change this method:
public boolean isSupportedLookAndFeel()
   {
   return isNativeLookAndFeel();
   }
to this one:
public boolean isSupportedLookAndFeel()
   {
   return true;
   }

Selecting L&F Programmatically

Using the Nimbus look & feel that comes with JDK 1.6.0_10+, is tricky since the class file that implements it might not be present. You want at all costs to avoid a NoClassDefFoundError.

Selecting L&F On the Command Line

You can also set the default look and feel on the command line:
java -Dswing.defaultlaf=com.incors.plaf.kunststoff.KunststoffLookAndFeel MyClass

Discovering Installed L&Fs

Discovering Active L&Fs

// discovering the current active Look and Feel
LookAndFeel laf = UIManager.getLookAndFeel();
String lafName = laf.getName();

Decorating

You can further improve the look with: JFrame.setDefaultLookAndFeelDecorated( true );

L&F Icons

You can use the get at the current L&F icons with code like this:
// Get an icon that looks just like the one the L&F uses
// for closing internal frames.
Icon closeIcon = UIManager.getIcon( "InternalFrame.closeIcon" );

Overriding

You can override colours in a given L&F with code like this:
// overriding a colour in the L&F
UIManager.put( "TabbedPane.selected", Color.RED );
The values you can feed to UIManager.put are undocumented, but you can learn about them by studying the source code in src.zip for javax.swing.basic.BasicLookAndFeel. java.

Another approach is to write your own Look & Feel that extends some other one, and just overrides a few font-defining methods or colour-defining methods. See this sample code for a writing a derived LAF.

Gotchas

Learning More

Sun’s Javadoc on the LookAndFeel class : available:
Sun’s Javadoc on the UIDefaults class : available:
Sun’s Javadoc on the UIManager class : available:
Sun’s JDK Technote Guide on Nimbus : available:

Books

book cover recommend book⇒Java Look and Feel Design Guidelines (2nd Edition)
 paperback
ISBN13:978-0-201-72588-9clickcounter
ISBN10:0-201-72588-6clickcounter
publisher:Addison-Wesley
published:2001-03-19
by:Sun Microsystems
This book contains no code. It about how to design a good UI using Metal as an example. It contains Sun’s standards for how many pixels to use for various purposes.
UK flag abe books.co.uk abe books.ca Canadian flag
UK flag amazon.co.uk. amazon.ca. Canadian flag
German flag abe books.de chapters.indigo.ca . Canadian flag
German flag amazon.de. abe books.com American flag
French flag abe books.fr amazon.com. American flag
French flag amazon.fr. barnes and noble.com American flag
Italian flag abe books.it powells.com American flag
Spanish flag iberlibro.com abe books anz Australian flag

book cover recommend book⇒Java Look and Feel Design Guidelines: Advanced Topics
 paperback
ISBN13:978-0-201-77582-2clickcounter
ISBN10:0-201-77582-4clickcounter
publisher:Addison-Wesley
published:2001-12-27
by:Sun Microsystems
It is about how to design a good UI using Metal as an example.
UK flag abe books.co.uk abe books.ca Canadian flag
UK flag amazon.co.uk. amazon.ca. Canadian flag
German flag abe books.de chapters.indigo.ca . Canadian flag
German flag amazon.de. abe books.com American flag
French flag abe books.fr amazon.com. American flag
French flag amazon.fr. barnes and noble.com American flag
Italian flag abe books.it powells.com American flag
Spanish flag iberlibro.com abe books anz Australian flag

book cover recommend book⇒GUI Bloopers: Don’ts and Do’s for Software Developers and Web Designers
 paperback
ISBN13:978-1-55860-582-4clickcounter
ISBN10:1-55860-582-7clickcounter
publisher:Morgan Kaufmann
published:2000-03-17
by:Jeff Johnson
Works by analysing 82 examples of bad design.
UK flag abe books.co.uk abe books.ca Canadian flag
UK flag amazon.co.uk. amazon.ca. Canadian flag
German flag abe books.de chapters.indigo.ca . Canadian flag
German flag amazon.de. abe books.com American flag
French flag abe books.fr amazon.com. American flag
French flag amazon.fr. barnes and noble.com American flag
Italian flag abe books.it powells.com American flag
Spanish flag iberlibro.com abe books anz Australian flag
Alloy L&F: commercial, 4 variants, glass effect
changing default fonts
decorated
EaSynth L&F
GUI
Infonode L&F: very simple
JavooToo Look & Feel Collection
JGoodies Looks L&F
JGoodies Looks Plastic L&F
JGoodies Looks Windows L&F
JTattoo L&F: commercial, free for freeware authors, 10 variants
Lipstik L&F: bold high contrast
Liquid L&F: 3D oval clear bubbles
Microsoft Vista User Experience (L&F) guide
Napkin L&F: for presenting prototype ideas, pencil scribbling
NimROD L&F: bold colours, several variants
Office L&F: close copy of Microsoft look
Oyoaha L&F: with many pluggable monochome themes
Pgs L&F: similar to Vista
Quaqua L&F: like native OS X
skin
SkinLF: over 20 L&Fs, supports GTK and KDE skins
Squareness L&F: minimalist, flat
Substance L&F: with component-level scaling, and skins on top of the L&F. Precise looking
Swing
Synthetica L&F: commerical, bland
Tiny L&F: minimalist, flat
Tonic L&F: like themes used in the Windows NT days

CMP homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.62] The information on this page is for non-military use only.
You are visitor number 19,165. Military use includes use by defence contractors.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/laf.html J:\mindprod\jgloss\laf.html