| Mac L&F | Discovering Active L&Fs | Gotchas |
| Selecting Programmatically | Decorating | Learning More |
| Command Line | Icons | Books |
| Discovering Installed L&Fs | Overriding | Links |
public boolean isSupportedLookAndFeel() { return isNativeLookAndFeel(); }to this one:
public boolean isSupportedLookAndFeel() { return true; }
java -Dswing.defaultlaf=com.incors.plaf.kunststoff.KunststoffLookAndFeel MyClass
// discovering the current active Look and Feel LookAndFeel laf = UIManager.getLookAndFeel(); String lafName = laf.getName();
// Get an icon that looks just like the one the L&F uses // for closing internal frames. Icon closeIcon = UIManager.getIcon( "InternalFrame.closeIcon" );
// 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.
// persuade Swing to use your custom class loader to load LAF classes UIManager.getDefaults().put( "ClassLoader", loader );
![]() |
recommend book⇒Java Look and Feel Design Guidelines (2nd Edition) | |
| paperback | ||
|---|---|---|
| ISBN13: | 978-0-201-72588-9 | |
| ISBN10: | 0-201-72588-6 | |
| 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. | ||
![]() |
recommend book⇒Java Look and Feel Design Guidelines: Advanced Topics | |
| paperback | ||
|---|---|---|
| ISBN13: | 978-0-201-77582-2 | |
| ISBN10: | 0-201-77582-4 | |
| publisher: | Addison-Wesley | |
| published: | 2001-12-27 | |
| by: | Sun Microsystems | |
| It is about how to design a good UI using Metal as an example. | ||
![]() |
recommend book⇒GUI Bloopers: Don’ts and Do’s for Software Developers and Web Designers | |
| paperback | ||
|---|---|---|
| ISBN13: | 978-1-55860-582-4 | |
| ISBN10: | 1-55860-582-7 | |
| publisher: | Morgan Kaufmann | |
| published: | 2000-03-17 | |
| by: | Jeff Johnson | |
| Works by analysing 82 examples of bad design. | ||
![]() |
and suggestions to improve this page to Roedy Green : | ||
| Canadian Mind Products | |||
| 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 | ||