-
Type:
Enhancement
-
Resolution: Unresolved
-
Priority:
P4
-
None
-
Affects Version/s: 5.0
-
Component/s: client-libs
-
x86
-
linux
The JRE includes several Swing look & feel implementations, but it fails to provide any mechanism to autodiscover the L&Fs which are actually available at runtime. The normal way of doing this is using the JAR services notation. Therefore, one would expect rt.jar to contain an entry such as
---%<--- META-INF/services/javax.swing.LookAndFeel
javax.swing.plaf.metal.MetalLookAndFeel
com.sun.java.swing.plaf.motif.MotifLookAndFeel
com.sun.java.swing.plaf.windows.WindowsLookAndFeel
com.sun.java.swing.plaf.gtk.GTKLookAndFeel
---%<---
And of course third-party L&F impls should include their own service registrations.
This convention permits creation of a generic L&F switcher control which can discover any available options automatically. There is such a module written for NetBeans:
http://contrib.netbeans.org/plafswitcher/
---%<--- META-INF/services/javax.swing.LookAndFeel
javax.swing.plaf.metal.MetalLookAndFeel
com.sun.java.swing.plaf.motif.MotifLookAndFeel
com.sun.java.swing.plaf.windows.WindowsLookAndFeel
com.sun.java.swing.plaf.gtk.GTKLookAndFeel
---%<---
And of course third-party L&F impls should include their own service registrations.
This convention permits creation of a generic L&F switcher control which can discover any available options automatically. There is such a module written for NetBeans:
http://contrib.netbeans.org/plafswitcher/