Mac L&F | Decorating | Gotchas |
Selecting Programmatically | Icons | Learning More |
Command Line | Overriding | Books |
Discovering Installed L&Fs | Persistence | Links |
Discovering Active L&Fs | User Selected |
public boolean isSupportedLookAndFeel() { return isNativeLookAndFeel(); }to
public boolean isSupportedLookAndFeel() { return true; }However, if you released code that did that, the Apple lawyers would be down your neck. Even if you used the third party QuaQua L&F that more closely mimics the Mac OS (Operating System) X UI (User Interface) than Oracle’s L&F does, you would get in legal trouble if your app allowed QuaQua to run on anything but a Mac, except for development testing. If you use QuaQua, you must bundle the quaqua.jar with your application/Applet and ensure it is on the classpath.
Using the Nimbus look & feel that comes with JDK (Java Development Kit) 1.8.0_131+, is tricky since the class file that implements it might
// 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⇒GUI Bloopers 2.0: Don’ts and Do’s for Software Developers and Web Designers | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
by | Jeff Johnson | 978-0-12-370643-0 | paperback | |||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
publisher | Morgan Kaufmann | 978-0-08-055214-9 | eBook | |||||||||||||||||||||||||||||||||||||||||||||||||||||
published | 2007-10-12 | B006L1ZUWU | kindle | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Works by analysing 82 examples of bad design. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Greyed out stores probably do not have the item in stock. Try looking for it with a bookfinder. |
recommend book⇒Java Look and Feel Design Guidelines: Advanced Topics | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
by | Sun Microsystems | 978-0-201-77582-2 | paperback | |||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
birth | 1982 age:35 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
publisher | Addison-Wesley | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
published | 2001-12-27 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
It is about how to design a good UI using Metal as an example. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Greyed out stores probably do not have the item in stock. Try looking for it with a bookfinder. |
recommend book⇒Java Look and Feel Design Guidelines, second edition | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
by | Sun Microsystems | 978-0-201-72588-9 | paperback | |||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
birth | 1982 age:35 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
publisher | Addison-Wesley | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
published | 2001-03-19 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
This book contains no code. It about how to design a good UI using Metal as an example. It contains Oracle’s standards for how many pixels to use for various purposes. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Greyed out stores probably do not have the item in stock. Try looking for it with a bookfinder. |
This page is posted |
http://mindprod.com/jgloss/laf.html | |
Optional Replicator mirror
|
J:\mindprod\jgloss\laf.html | |
Please read the feedback from other visitors,
or send your own feedback about the site. Contact Roedy. Please feel free to link to this page without explicit permission. | ||
Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[18.116.47.235] |
| |
Feedback |
You are visitor number | |