Class c = Class.forName(className); LookAndFeel a = (LookAndFeel) c.newInstance(); setLookAndFeel(a);
if (newLookAndFeel != null && ! newLookAndFeel.isSupportedLookAndFeel()) throw new UnsupportedLookAndFeelException(newLookAndFeel.getName());  LookAndFeel oldLookAndFeel = currentLookAndFeel; if (oldLookAndFeel != null) oldLookAndFeel.uninitialize();   currentLookAndFeel = newLookAndFeel; if (newLookAndFeel != null) { newLookAndFeel.initialize(); currentUIDefaults = newLookAndFeel.getDefaults(); } else { currentUIDefaults = null; } listeners.firePropertyChange("lookAndFeel", oldLookAndFeel, newLookAndFeel);
  public static void setLookAndFeel(String className)    throws ClassNotFoundException, InstantiationException, IllegalAccessException,    UnsupportedLookAndFeelException  {    Class c = Class.forName(className);    LookAndFeel a = (LookAndFeel) c.newInstance(); // throws class-cast-exception    setLookAndFeel(a);  }