Como enumerar os Look and Feels instalados?

Como faço para pegar os Look and Feels instalados ?

A chamada a UIManager.getInstalledLookAndFeels() só me retorna os LnFs padrões:

Metal
CDE/Motif
Windows

Tenho instalado no lib\ext, outros LnFs que consigo usar na minha aplicação, mas gostaria de um meio de poder colocar em um menu o nome de cada um.

Como faço ?

Na verdade não basta copiar os arquivos para jre/lib/ext. Se realmente quer outras LAFs, você precisa criar um arquivo swing.properties (é necessário ler o fonte de UIManager.java para saber como criar e editar esse arquivo.) Veja o fonte de getInstalledLookAndFeels para entender porque é que ele só retorna essas 3 LAFs.

    /** 
     * Returns an array of objects that provide some information about the
     * <code>LookAndFeel</code> implementations that have been installed with this 
     * software development kit.  The <code>LookAndFeel</code> info objects can
     * used by an application to construct a menu of look and feel options for 
     * the user or to set the look and feel at start up time.  Note that 
     * we do not return the <code>LookAndFeel</code> classes themselves here to
     * avoid the cost of unnecessarily loading them.
     * <p>
     * Given a &lt;code&gt;LookAndFeelInfo&lt;/code&gt; object one can set the current
     * look and feel like this:
     * &lt;pre&gt;
     * UIManager.setLookAndFeel(info.getClassName());
     * &lt;/pre&gt;
     * @return an array of &lt;code&gt;LookAndFeelInfo&lt;/code&gt; objects
     * 
     * @see #setLookAndFeel
     */
    public static LookAndFeelInfo[] getInstalledLookAndFeels() {
        maybeInitialize();
        LookAndFeelInfo[] ilafs = installedLAFs;
        LookAndFeelInfo[] rv = new LookAndFeelInfo[ilafs.length];
        System.arraycopy(ilafs, 0, rv, 0, ilafs.length);
        return rv;
    }


    /**
     * The default value of &lt;code&gt;installedLAFS&lt;/code&gt; is used when no
     * swing.properties
     * file is available or if the file doesn't contain a "swing.installedlafs"
     * property.   
     * 
     * @see #initializeInstalledLAFs
     */
    private static LookAndFeelInfo[] installedLAFs = {
        new LookAndFeelInfo("Metal", "javax.swing.plaf.metal.MetalLookAndFeel"),
        new LookAndFeelInfo("CDE/Motif", "com.sun.java.swing.plaf.motif.MotifLookAndFeel"),
        new LookAndFeelInfo("Windows", "com.sun.java.swing.plaf.windows.WindowsLookAndFeel")
    };

Mesmo tendo criado o “maledeto” do swing.properties, descobri que tb ele não resolve 100% dos casos.

Dependendo do classpath da aplicação que se está executando e se quer mudar o lnf, ela vai enxergar somente os lnf padrão.

Aí fica aquela briga. Ou vc muda o classpath do ambiente, mas daí o Eclipse tem o dele próprio, ou vc muda o bat da aplicação,etc…

Enfim, obrigado pela ajuda. Desisti de tentar esta enumeração.