Java Swing Look and Feel setNativeLookAndFeel()

Here you can find the source of setNativeLookAndFeel()

Description

set Native Look And Feel

License

Open Source License

Declaration

public static void setNativeLookAndFeel() 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import javax.swing.UIManager;

public class Main {
    public static void setNativeLookAndFeel() {
        UIManager.put("Slider.paintValue", false);
        try {/*from ww  w  . j av a 2  s.c  o  m*/
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
            // UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");

            return;
        } catch (Exception e) {
        }
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (Exception e) {
        }
    }
}

Related

  1. setLookAndTheme(LookAndFeel laf, Object theme)
  2. setMetalLAF()
  3. setMotifLookAndFeel()
  4. setMotifLookAndFeel()
  5. setMotifLookAndFeel()
  6. setNativeLookAndFeel()
  7. setNiceSwingLookAndFeel()
  8. setNimbusLookAndFeel()
  9. setNimbusLookAndFeel()