Java Swing Look and Feel defaultLookAndFeel()

Here you can find the source of defaultLookAndFeel()

Description

default Look And Feel

License

Open Source License

Declaration

public static void defaultLookAndFeel() 

Method Source Code

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

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

public class Main {
    public static String DEFAULT_LOOK_AND_FEEL = "GTK+";

    public static void defaultLookAndFeel() {
        try {/*from  ww  w .  j  av  a  2 s. co  m*/
            for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
                if (DEFAULT_LOOK_AND_FEEL.equals(info.getName())) {
                    UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (Exception e) {
        }
    }

    public static boolean equals(Object o1, Object o2) {
        if (o1 == o2) {
            return true;
        }

        if (o1 == null) {
            return false;
        }

        return o1.equals(o2);
    }
}

Related

  1. applyNimbusLaF()
  2. applyStartupLookAndFeel(String desiredLafClassName)
  3. checkGTKLookAndFeel()
  4. checkThemeLiscense(LookAndFeelInfo i)
  5. computeIsLafAqua()
  6. enableLafIfAvailable(String lafName)
  7. fixLnF()
  8. getAvailableLookAndFeels()
  9. getAvailableLookAndFeels()