Sets the look and feel of the calling Java program to that of the system which it is running on. - Java Swing

Java examples for Swing:Look and Feel

Description

Sets the look and feel of the calling Java program to that of the system which it is running on.

Demo Code


//package com.java2s;

import javax.swing.UIManager;

public class Main {
    /**//w  ww.  ja  v  a 2s .c  o m
     * Sets the look and feel of the calling Java program to that of the system which it is running on.
     *
     */
    public static void setNativeLookAndFeel() {
        try {
            UIManager.setLookAndFeel(UIManager
                    .getSystemLookAndFeelClassName());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Related Tutorials