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 <code>LookAndFeelInfo</code> object one can set the current * look and feel like this: * <pre> * UIManager.setLookAndFeel(info.getClassName()); * </pre> * @return an array of <code>LookAndFeelInfo</code> objects * * @see #setLookAndFeel */publicstaticLookAndFeelInfo[]getInstalledLookAndFeels(){maybeInitialize();LookAndFeelInfo[]ilafs=installedLAFs;LookAndFeelInfo[]rv=newLookAndFeelInfo[ilafs.length];System.arraycopy(ilafs,0,rv,0,ilafs.length);returnrv;}/** * The default value of <code>installedLAFS</code> is used when no * swing.properties * file is available or if the file doesn't contain a "swing.installedlafs" * property. * * @see #initializeInstalledLAFs */privatestaticLookAndFeelInfo[]installedLAFs={newLookAndFeelInfo("Metal","javax.swing.plaf.metal.MetalLookAndFeel"),newLookAndFeelInfo("CDE/Motif","com.sun.java.swing.plaf.motif.MotifLookAndFeel"),newLookAndFeelInfo("Windows","com.sun.java.swing.plaf.windows.WindowsLookAndFeel")};
P
PoneyMan
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.