import javax.swing.LookAndFeel;
import javax.swing.UIManager;
+import javax.swing.UIManager.LookAndFeelInfo;
import com.threerings.getdown.util.LaunchUtil;
System.err.println("Could not set requested laf=" + laf);
}
break;
+ case "nimbus":
+ lafSet = setNimbusLookAndFeel();
+ {
+ System.err.println("Could not set requested laf=" + laf);
+ }
+ break;
case "mac":
lafSet = setMacLookAndFeel();
if (!lafSet)
String laf = "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";
try
{
+ for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
+ if (info.getName() != null && info.getName().startsWith("Gtk")) {
+ laf = info.getClassName();
+ break;
+ }
+ }
UIManager.setLookAndFeel(laf);
set = true;
} catch (Exception ex)
String laf = "javax.swing.plaf.metal.MetalLookAndFeel";
try
{
+ for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
+ if (info.getName() != null && info.getName().equals("Metal")) {
+ laf = info.getClassName();
+ break;
+ }
+ }
+ UIManager.setLookAndFeel(laf);
+ set = true;
+ } catch (Exception ex)
+ {
+ System.err.println("Unexpected Look and Feel Exception");
+ ex.printStackTrace();
+ }
+ return set;
+ }
+
+ private static boolean setNimbusLookAndFeel()
+ {
+ boolean set = false;
+ String laf = "javax.swing.plaf.nimbus.NimbusLookAndFeel";
+ try
+ {
+ for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
+ if (info.getName() != null && info.getName().equals("Nimbus")) {
+ laf = info.getClassName();
+ break;
+ }
+ }
UIManager.setLookAndFeel(laf);
set = true;
} catch (Exception ex)