On 17 June 2010 14:54, Walter Laan <[email protected]> wrote: >> I've just installed JRE6u20 (sun's proprietary builds) and as far as I >> can see nimbus is no longer included in that distribution? >> Am I just wrong, or has it really been omitted? > > It's still under com.sun.java.plaf.nimbus.* > > import java.awt.EventQueue; > > import javax.swing.JFrame; > import javax.swing.JLabel; > import javax.swing.UIManager; > import javax.swing.UIManager.LookAndFeelInfo; > > public class TestNimbus { > public static void main(String[] args) { > EventQueue.invokeLater(new Runnable() { > public void run() { > String nimbus = "No Nimbus"; > for (LookAndFeelInfo info : > UIManager.getInstalledLookAndFeels()) { > if ("nimbus".equalsIgnoreCase(info.getName())) { > try { > nimbus = info.getClassName(); > UIManager.setLookAndFeel(nimbus); > } > catch (Exception e) { > e.printStackTrace(); > } > break; > } > } > > JFrame frame = new JFrame("Test"); > frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); > frame.getContentPane().add(new JLabel( > System.getProperty("java.version") + ": " + > nimbus)); > frame.pack(); > frame.setLocationRelativeTo(null); > frame.setVisible(true); > } > }); > } > } > >
It's also available in the same package in IcedTea6 1.8 which should be available through your distro's OpenJDK packages. I don't know why you'd need to use the proprietary binaries for this. -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
