Beispiel #1
0
 public static void setPLAF(String s) {
   try {
     if (s.equals("TinyLAF")) {
       javax.swing.UIManager.setLookAndFeel("de.muntjak.tinylookandfeel.TinyLookAndFeel");
     } else if (s.equals("JGoodiesLAF-PlasticXP")) {
       javax.swing.UIManager.setLookAndFeel("com.jgoodies.plaf.plastic.PlasticXPLookAndFeel");
     } else if (s.equals("JGoodiesLAF-Plastic")) {
       javax.swing.UIManager.setLookAndFeel("com.jgoodies.plaf.plastic.PlasticLookAndFeel");
     } else if (s.equals("JGoodiesLAF-Plastic3D")) {
       javax.swing.UIManager.setLookAndFeel("com.jgoodies.plaf.plastic.Plastic3DLookAndFeel");
     } else if (s.equals("JGoodiesLAF-ExtWindows")) {
       javax.swing.UIManager.setLookAndFeel("com.jgoodies.plaf.windows.ExtWindowsLookAndFeel");
     } else if (s.equals("System")) {
       javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
     } else {
       javax.swing.UIManager.LookAndFeelInfo[] lfinfo =
           javax.swing.UIManager.getInstalledLookAndFeels();
       for (int i = 0; i < lfinfo.length; ++i) {
         if (lfinfo[i].getName().equalsIgnoreCase(s)) {
           javax.swing.UIManager.setLookAndFeel(lfinfo[i].getClassName());
           return;
         }
       }
     }
   } catch (Exception ex) {
     ex.printStackTrace();
   }
 }
Beispiel #2
0
 static {
   try {
     javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
   } catch (Exception e) {
   }
 }