!752 //1003438 // Substance Lite lib 1003442 // Substance lib 1003441 // Trident (required by Substance) //1003443 //1003444 import org.pushingpixels.substance.api.*; import org.pushingpixels.substance.api.skin.*; static S skinName = //"Magellan"; // blue background is kind of hard to read "Creme"; p { if (substanceLookAndFeelEnabled()) ret; swingAndWait(r { ClassLoader cl = main.class.getClassLoader(); //print("LAF: " + getLookAndFeel()); UIManager.getDefaults().put("ClassLoader", cl); // Fix class lookup for Trident. // Not completely sure if this works all the time. // There might be multiple AWT threads? // If there's one, it works. Thread.currentThread().setContextClassLoader(cl); //UIManager.setLookAndFeel(new SubstanceCremeLookAndFeel()); S skinClassName = "org.pushingpixels.substance.api.skin." + addSuffix(skinName, "Skin"); SubstanceSkin skin = (SubstanceSkin) nuObject(cl.loadClass(skinClassName)); SubstanceLookAndFeel.setSkin(skin); updateLookAndFeelOnAllWindows(); if (substanceLookAndFeelEnabled()) print("Substance L&F enabled."); else print("Could not enable Substance L&F?"); }); }