Java Swing Look and Feel setWindowsLookLike(Window window)

Here you can find the source of setWindowsLookLike(Window window)

Description

Set the specified window to the style of WindowsTM system.

License

Open Source License

Parameter

Parameter Description
window the specified window

Declaration

public static void setWindowsLookLike(Window window) 

Method Source Code

//package com.java2s;

import java.awt.Window;

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

public class Main {
    /**/*from ww w.j  av  a  2 s.co  m*/
     * 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();
        }
    }
}

Related

  1. setSystemLookAndFeel()
  2. setSystemLookAndFeel(Component c)
  3. setSystemLookAndFeel(Component comp, String lookAndFeelStr)
  4. setWindowsLook()
  5. setWindowsLookAndFeel()
  6. supportsDarkLookAndFeel()
  7. trySetNimbusLookAndFeel()
  8. tryToSetSystemLookAndFeel()
  9. tweakLookAndFeel()