Java Swing Look and Feel getLookAndFeel(String name)

Here you can find the source of getLookAndFeel(String name)

Description

get Look And Feel

License

LGPL

Declaration

public static String getLookAndFeel(String name) 

Method Source Code

//package com.java2s;
/**// w ww  .  j  av a 2s  . com
 * Copyright 2011-2016 Three Crickets LLC.
 * <p>
 * The contents of this file are subject to the terms of the LGPL version 3.0:
 * http://www.gnu.org/copyleft/lesser.html
 * <p>
 * Alternatively, you can obtain a royalty free commercial license with less
 * limitations, transferable or non-transferable, directly from Three Crickets
 * at http://threecrickets.com/
 */

import javax.swing.UIManager;

public class Main {
    public static String getLookAndFeel(String name) {
        if (!"native".equals(name))
            for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels())
                if (name.equals(info.getName().toLowerCase()))
                    return info.getClassName();
        return null;
    }
}

Related

  1. getAvailableLookAndFeels()
  2. getInstalledLookAndFeels()
  3. getLAF(int lafNumber)
  4. getLafClassName(String lafName)
  5. getLookAndFeel(final String displayName)
  6. getLookAndFeelInfo()
  7. getLookAndFeelToSave()
  8. getNimbusLAF()
  9. getSortedInstalledLAFInfos()