UIManager: getCrossPlatformLookAndFeelClassName() : UIManager « javax.swing « Java by API






UIManager: getCrossPlatformLookAndFeelClassName()

  


import javax.swing.JFrame;
import javax.swing.UIManager;

public class Main {
  public static void main(String[] args) {
    try {
      UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
    } catch (Exception e) {
      System.err.println("Look and feel not set.");
    }
    JFrame aWindow = new JFrame("This is the Window Title");
    aWindow.setBounds(50, 100, 300, 300);
    aWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    aWindow.setVisible(true);
  }
}

   
    
  








Related examples in the same category

1.UIManager.LookAndFeelInfo: getClassName()
2.UIManager.LookAndFeelInfo: getClassName() (2)
3.UIManager.LookAndFeelInfo: getName()
4.UIManager: get(Object key)
5.UIManager: getBorder(Object key)
6.UIManager: getInstalledLookAndFeels()
7.UIManager: getLookAndFeelDefaults()
8.UIManager: getSystemLookAndFeelClassName()
9.UIManager: put(Object key, Object value)
10.UIManager: setLookAndFeel(String className)