private static void setLookAndFeel()

in src/org/pushingpixels/lightbeam/DynamicPerformanceSuite.java [410:429]


    private static void setLookAndFeel() throws UnsupportedLookAndFeelException, IllegalAccessException,
            InstantiationException, ClassNotFoundException {

        if (System.getProperty("os.name").toLowerCase(Locale.US).startsWith("mac") ||
                System.getProperty("os.name").toLowerCase(Locale.US).startsWith("windows"))
            UIManager.setLookAndFeel(new javax.swing.plaf.metal.MetalLookAndFeel());
        else if (System.getProperty("os.name").toLowerCase(Locale.US).startsWith("linux")) {
            UIManager.setLookAndFeel(new javax.swing.plaf.metal.MetalLookAndFeel());
            UIManager.setLookAndFeel(
                    (BasicLookAndFeel) ClassLoader.getSystemClassLoader().loadClass(GTK_LAF_CLASS).newInstance());
        }

        lafClass = System.getProperty("test.laf");
        UIManager.setLookAndFeel(
                (BasicLookAndFeel) ClassLoader.getSystemClassLoader().loadClass(lafClass).newInstance());

        // static init it is hell - UIUtil static init is called too early, so, call it to init properly
        // (otherwise null stylesheet added and it leads to NPE on set comment text)
        UIManager.getDefaults().put("javax.swing.JLabel.userStyleSheet", createStyleSheet());
    }