Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.awt.Window;

import javax.swing.SwingUtilities;
import javax.swing.UIManager;

public class Main {
    /**
     * Set the specified window to the style of Windows<sup>TM</sup> system.
     * 
     * @param window
     *            the specified window
     * @deprecated Please use {@link SwingUtils#setSystemLookAndFeel(Component)}
     *             instead.
     */
    public static void setWindowsLookLike(Window window) {
        try {
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");//$NON-NLS-1$
            SwingUtilities.updateComponentTreeUI(window);
            window.validate();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}