| Spice Up Your Swing UI with Substance |
| Java Concepts | ||||||||||||||||||||||||||||||
| Written by Phoenix | ||||||||||||||||||||||||||||||
| Tuesday, 27 May 2008 18:03 | ||||||||||||||||||||||||||||||
|
Give your Swing applications a cool look and feel with Substance. Substance Java look & feel is a project to provide a modern look & feel that combines graphic ideas from Windows XP / Vista and MacOS 10.4. This look & feel is available for JDK 5.0+ only. You can download substance from substance.dev.java.net
Java Swings provides pluggable look and feel, you can change the look and feel of your swing applications with very little change.
These look and feels provide many additional features which the built in look and feels do not have:
8) Heap Status Display 9) About 20 Themes You can check out the screen shots here https://substance.dev.java.net/docs/themes/simple.html 12) Many Moreā¦
In order to use Substance look and feel in your application, you can use one of the following: * UIManager.setLookAndFeel("org.jvnet.substance.SubstanceLookAndFeel"); * Start your VM with -Dswing.defaultlaf=org.jvnet.substance.SubstanceLookAndFeel
This will use the substance look and feel with the default AQUA theme. In order to change the current theme, you can call SubstanceLookAndFeel.setCurrentTheme() with one of the above themes, for example SubstanceLookAndFeel.setCurrentTheme(new SubstanceBrownTheme()) Call SubstanceLookAndFeel.setCurrentTheme() with the fully qualified name of one of the above themes, for example SubstanceLookAndFeel.setCurrentTheme ("org.jvnet.substance.theme.SubstanceBrownTheme") Set substancelaf.theme parameter of the VM, for example -Dsubstancelaf.theme=org.jvnet.substance.theme.SubstanceBrownTheme If you use one of the first two options after your application has started, don't forget to call: UIManager.setLookAndFeel(new SubstanceLookAndFeel()); SwingUtilities.updateComponentTreeUI(...); The first call is mandatory in versions 2.2, 2.3 and 3.0. The second call should be performed on all open frames (you can use Frame.getFrames() function).
Only registered users can write comments!
Powered by !JoomlaComment 3.22
3.22 Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved." |
||||||||||||||||||||||||||||||
| Last Updated ( Tuesday, 27 May 2008 19:19 ) | ||||||||||||||||||||||||||||||

















