June 21, 2016

How to Install Look And Feel in Swing

  1. Programmatically
  2. UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
    
  3. System Property
  4. java -Dswing.defaultlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel MyApp
    
  5. Globally
  6. Add the following line to the $JAVA_HOME/lib/swing.properties:

    swing.defaultlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel
    

For details see https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/nimbus.html.

No comments: