Java Swing Look and Feel lookLikeSystem()

Here you can find the source of lookLikeSystem()

Description

Sets the GUI to look like the systems standard GUI.

License

Open Source License

Declaration

public static void lookLikeSystem() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

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

public class Main {
    /**/*from  w  w  w  .  j ava  2s  . c o m*/
     * Sets the GUI to look like the systems standard GUI.
     */
    public static void lookLikeSystem() {

        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. isWinLAF()
  2. isWinLAF()
  3. isXP()
  4. listLookAndFeels()
  5. lookAndFeelDefault(String style)
  6. matchLnf(LookAndFeel lookAndFeel, UIManager.LookAndFeelInfo lookAndFeelInfo)
  7. metalLookAndFeel()
  8. nativeLook()
  9. printInstalledLookAndFeel()