Java Swing Look and Feel setLookAndFeel()

Here you can find the source of setLookAndFeel()

Description

set Look And Feel

License

Open Source License

Declaration

public static void setLookAndFeel() 

Method Source Code

//package com.java2s;
/***************************************************************************
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License 3 as published by
the Free Software Foundation./*  w  w w . j  ava  2s.c  om*/
    
This program 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.
 ***************************************************************************/

import javax.swing.*;

public class Main {
    public static void setLookAndFeel() {
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (UnsupportedLookAndFeelException e) {
            e.printStackTrace();
        }
    }
}

Related

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