desktop = null;
- // property laf = "crossplatform", "system", "gtk" or "mac"
+ // property laf = "crossplatform", "system", "gtk", "metal" or "mac"
// If not set (or chosen laf fails), use the normal SystemLaF and if on Mac,
// try Quaqua/Vaqua.
String laf = System.getProperty("laf", "none");
System.err.println("Could not set requested laf=" + laf);
}
break;
+ case "metal":
+ lafSet = setMetalLookAndFeel();
+ {
+ System.err.println("Could not set requested laf=" + laf);
+ }
+ break;
case "mac":
lafSet = setMacLookAndFeel();
if (!lafSet)
return set;
}
+ private static boolean setMetalLookAndFeel()
+ {
+ boolean set = false;
+ String laf = "javax.swing.plaf.metal.MetalLookAndFeel";
+ try
+ {
+ UIManager.setLookAndFeel(laf);
+ set = true;
+ } catch (Exception ex)
+ {
+ System.err.println("Unexpected Look and Feel Exception");
+ ex.printStackTrace();
+ }
+ return set;
+ }
+
private static boolean setMacLookAndFeel()
{
boolean set = false;