Java Swing UIManager useLnf(String lnfClassName)

Here you can find the source of useLnf(String lnfClassName)

Description

Use supplied l&f.

License

Open Source License

Parameter

Parameter Description
lnfClassName L&f class name

Declaration

public static void useLnf(String lnfClassName) 

Method Source Code

//package com.java2s;
/*// w w  w  .  ja va2 s  .com
 * Copyright 2004 - 2013 Wayne Grant
 *           2013 - 2018 Kai Kramer
 *
 * This file is part of KeyStore Explorer.
 *
 * KeyStore Explorer is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * KeyStore Explorer is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with KeyStore Explorer.  If not, see <http://www.gnu.org/licenses/>.
 */

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

public class Main {
    /**
     * Use supplied l&f.
     *
     * @param lnfClassName
     *            L&f class name
     */
    public static void useLnf(String lnfClassName) {
        try {
            UIManager.setLookAndFeel(lnfClassName);
        } catch (UnsupportedLookAndFeelException e) {
        } catch (ClassNotFoundException e) {
        } catch (InstantiationException e) {
        } catch (IllegalAccessException e) {
        }
    }
}

Related

  1. showDirSelect()
  2. showToolTip(Component contents, int x, int y, final int dismissDelay, int initialDelay)
  3. systemLF()
  4. traceSubstanceApiUsage(Component comp, String message)
  5. useLNF()
  6. usingLnf(String lnfClass)
  7. usingMetalLnf()
  8. usingOcean()