Java Swing Look and Feel setLookAndFeel()

Here you can find the source of setLookAndFeel()

Description

set Look And Feel

License

Academic Free License

Declaration

public static void setLookAndFeel() 

Method Source Code

//package com.java2s;
//License from project: Academic Free License 

import javax.swing.UIManager;
import javax.swing.UIManager.LookAndFeelInfo;

public class Main {
    public static void setLookAndFeel() {
        try {/* ww  w  . j  a  v  a2  s.co m*/
            for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
                //System.out.println(info.getName());
                if ("Nimbus".equals(info.getName())) {
                    UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (Exception e) {
            // If Nimbus is not available, you can set the GUI to another look and feel.
        }
    }
}

Related

  1. setLAF(final String lafName)
  2. setLAF(String className)
  3. setLAF(String LAFName)
  4. setLaf(String lafName)
  5. setLAFNimbus()
  6. setLookAndFeel()
  7. setLookAndFeel()
  8. setLookAndFeel()
  9. setLookAndFeel()