Java 8 NimbusLookAndFeel - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 NimbusLookAndFeel class.

This code example shows how to use the following methods:sleep
JFrame f;
    WeakReference<JLabel> ref;
 
    public static void main(String[] args) throws Exception {
        UIManager.setLookAndFeel(new NimbusLookAndFeel());
        Test6919629 t = new Test6919629();
        t.test();
        System.gc();
        t.check();
    } 
 
    void test() throws Exception {
        SwingUtilities.invokeAndWait(new Runnable() {
            public void run() { 
                UIDefaults d = new UIDefaults();
                d.put("Label.textForeground", Color.MAGENTA);
 
                JLabel l = new JLabel();
                ref = new WeakReference<JLabel>(l);

5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 
        g = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_ARGB).getGraphics();
    } 
 
    public static void main(String[] args) throws Exception {
        nimbus = new NimbusLookAndFeel();
        try { 
            UIManager.setLookAndFeel(nimbus);
        } catch (UnsupportedLookAndFeelException e) {
            throw new Error("Unable to set Nimbus LAF");
        } 
        SwingUtilities.invokeAndWait(new Runnable() {
            @Override public void run() { 
                new ColorCustomizationTest().test(); 
            } 
        }); 
    } 
 
    void check(Color c) {
        SwingUtilities.updateComponentTreeUI(label);
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 
            //+ SynthFileChooserUI.UIBorder: 
            new SynthFileChooser().getUIBorder(), 
 
            //+ LoweredBorder: 
            new NimbusLookAndFeel().getDefaults().getBorder("TitledBorder.border"),
    }; 
 
    public static void main(String[] args) {
        for (Border border : BORDERS) {
            System.out.println(border.getClass());
            test(border, border.getBorderInsets(getComponent(border)));
            if (border instanceof AbstractBorder) {
                test((AbstractBorder) border);
            } 
        } 
    } 
 
    private static void test(AbstractBorder border) {
        Insets insets = new Insets(0, 0, 0, 0);
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
    public static void main(String[] args) throws Exception {
        UIManager.setLookAndFeel(new SynthLookAndFeel());
 
        checkImages(); 
 
        UIManager.setLookAndFeel(new NimbusLookAndFeel());
 
        checkImages(); 
    } 
 
    private static void checkImages() throws Exception {
        SwingUtilities.invokeAndWait(new Runnable() {
            public void run() { 
                HTMLEditorKit c = new HTMLEditorKit();
                HTMLDocument doc = new HTMLDocument();
 
                try { 
                    c.read(new StringReader("<HTML><TITLE>Test</TITLE><BODY><IMG id=test></BODY></HTML>"), doc, 0);
                } catch (Exception e) {
                    throw new RuntimeException("The test failed", e);
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
import javax.swing.*; 
import javax.swing.plaf.nimbus.NimbusLookAndFeel;
 
public class Test7048204 { 
    public static void main(String[] args) throws Exception {
        UIManager.setLookAndFeel(new NimbusLookAndFeel());
 
        SwingUtilities.invokeAndWait(new Runnable() {
            public void run() { 
                new JLabel();
 
                UIDefaults uid = UIManager.getDefaults();
                uid.putDefaults(new Object[0]);
                uid.put("what.ever", "else");
            } 
        }); 
    } 
} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Java 8 NimbusLookAndFeel Methods: