Java Swing Look and Feel initLookAndFeelIntern(final String className)

Here you can find the source of initLookAndFeelIntern(final String className)

Description

Initializes the look and feel and wraps exceptions into a runtime exception.

License

Open Source License

Parameter

Parameter Description
className Full qualified name of the look and feel class.

Declaration

private static void initLookAndFeelIntern(final String className) 

Method Source Code

//package com.java2s;
/**//from  www.jav a2 s  . c  om
 * Copyright (C) 2009 Future Invent Informationsmanagement GmbH. All rights
 * reserved. <http://www.fuin.org/>
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 3 of the License, or (at your option) any
 * later version.
 *
 * This library 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 Lesser General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library. If not, see <http://www.gnu.org/licenses/>.
 */

import javax.swing.UIManager;

public class Main {
    /**
     * Initializes the look and feel and wraps exceptions into a runtime
     * exception. It's executed in the calling thread.
     * 
     * @param className
     *            Full qualified name of the look and feel class.
     */
    private static void initLookAndFeelIntern(final String className) {
        try {
            UIManager.setLookAndFeel(className);
        } catch (final Exception e) {
            throw new RuntimeException("Error initializing the Look And Feel!", e);
        }
    }
}

Related

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