Java Swing UIManager initialize()

Here you can find the source of initialize()

Description

initialize

License

Open Source License

Declaration

public static void initialize() 

Method Source Code


//package com.java2s;
import java.awt.Color;

import javax.swing.UIDefaults;
import javax.swing.UIManager;

public class Main {
    public static void initialize() {
        try {/*from w w w  .  j  a v  a2s .com*/
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
            //UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
            UIDefaults ui = UIManager.getLookAndFeelDefaults();
            ui.put("TextPane.background", new Color(240, 240, 250));
            ui.put("Panel.background", new Color(240, 240, 250));

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Related

  1. getWindowsVisualStyle()
  2. GUI_unit(double p_GUI_unit, java.awt.Component c)
  3. init()
  4. initComponentHeight(final Component... components)
  5. initGui()
  6. initLnF()
  7. initNimbusStyle()
  8. installDefaults()
  9. installGtkPopupBugWorkaround()