Java Swing Look and Feel setLAFNimbus()

Here you can find the source of setLAFNimbus()

Description

set LAF Nimbus

License

Open Source License

Declaration

public static void setLAFNimbus() throws InstantiationException, ClassNotFoundException, IllegalAccessException,
            UnsupportedLookAndFeelException 

Method Source Code


//package com.java2s;
/*//from www .  j a  v a 2  s.  co m
 * Copyright (c) 2013, Bui Nguyen Thang, thang.buinguyen@gmail.com, thangbui.net. All rights reserved.
 * Licensed under the GNU General Public License version 2.0 (GPLv2)
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
 */

import javax.swing.*;

public class Main {
    public static void setLAFNimbus() throws InstantiationException, ClassNotFoundException, IllegalAccessException,
            UnsupportedLookAndFeelException {
        setLAF("Nimbus");
    }

    private static void setLAF(String LAFName) throws ClassNotFoundException, IllegalAccessException,
            UnsupportedLookAndFeelException, InstantiationException {
        for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
            if (LAFName.equals(info.getName())) {
                javax.swing.UIManager.setLookAndFeel(info.getClassName());
                break;
            }
        }
    }
}

Related

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