This patch (committed) allows the Swing demo to start up with the PlasticLookAndFeel from JGoodies specified as the current look and feel:

2006-09-06  David Gilbert  <[EMAIL PROTECTED]>

        * javax/swing/UIManager.java
        (MultiplexUIDefaults.MultiplexUIDefaults()): Don't allow null fallback,
        (getDefaults): Initialise MultiplexUIDefaults with empty fallback.

Note that the PlasticLookAndFeel is not in a working state yet because of incompatibilities between our implementation and Sun's.

To try this out, download JGoodies Looks and use the following to launch the Swing demo (obviously you'll need to modify the classpath to match your system):

jamvm -Dswing.defaultlaf=com.jgoodies.looks.plastic.PlasticLookAndFeel -classpath examples.zip:/home/dgilbert/looks-2.0.4/looks-2.0.4.jar gnu.classpath.examples.swing.Demo

Regards,

Dave






Index: javax/swing/UIManager.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/UIManager.java,v
retrieving revision 1.38
diff -u -r1.38 UIManager.java
--- javax/swing/UIManager.java  26 Jul 2006 07:45:41 -0000      1.38
+++ javax/swing/UIManager.java  6 Sep 2006 13:33:02 -0000
@@ -154,8 +154,16 @@
 
     UIDefaults fallback;
 
+    /**
+     * Creates a new <code>MultiplexUIDefaults</code> instance with 
+     * <code>d</code> as the fallback defaults.
+     * 
+     * @param d  the fallback defaults (<code>null</code> not permitted).
+     */
     MultiplexUIDefaults(UIDefaults d)
     {
+      if (d == null) 
+        throw new NullPointerException();
       fallback = d;
     }
 
@@ -483,7 +491,7 @@
   public static UIDefaults getDefaults()
   {
     if (currentUIDefaults == null)
-      currentUIDefaults = new MultiplexUIDefaults(null);
+      currentUIDefaults = new MultiplexUIDefaults(new UIDefaults());
     return currentUIDefaults;
   }
 

Reply via email to