Java Swing Look and Feel installLookAndFeel()

Here you can find the source of installLookAndFeel()

Description

Look and feel, helper for Schedule#start() and HospitalityMembers#start() .

License

Open Source License

Declaration

public static void installLookAndFeel() 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

public class Main {
    /**/* w ww .j a  v a 2s  . co m*/
     * Look and feel, helper for {@link Schedule#start()} and
     * {@link HospitalityMembers#start()}.
     */
    public static void installLookAndFeel() {
        UIManager.LookAndFeelInfo[] lafInfo = UIManager.getInstalledLookAndFeels();

        for (int i = 0; i < lafInfo.length; i++) {
            if (lafInfo[i].getName().equals("Windows")) {
                try {
                    UIManager.setLookAndFeel(lafInfo[i].getClassName());
                } catch (ClassNotFoundException e) {
                    e.printStackTrace(); // TODO Logger for all these exceptions
                } catch (InstantiationException e) {
                    e.printStackTrace();
                } catch (IllegalAccessException e) {
                    e.printStackTrace();
                } catch (UnsupportedLookAndFeelException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}

Related

  1. getSystemLAF()
  2. initLookAndFeel()
  3. initLookAndFeel()
  4. initLookAndFeel(final String className)
  5. initLookAndFeelIntern(final String className)
  6. isAqua()
  7. isAquaLookAndFeel()
  8. isAquaLookAndFeel()
  9. isAquaLookAndFeel()