One of the skins of the Java Swing interface that was first unveiled in Java 6 Update 10.
When Swing's old metal interface looks first released, its main aesthetic competition comes from the Windows 95 interface. In the graphical user community ten years ago
Surface conditions, the Metal interface is an attractive and elegant choice compared to other ordinary interfaces of the time.
The updated Ocean theme in Java SE 5 helps Metal become a viable option today, but it's also a matter of modifying Swing across the platform interface
The urgency.
Entering the appearance of the Nimbus interface, you can see a new modern look based on synthesis. Nimbus provides a perfect interface for its applications.
And Nimbus completely uses Java 2D vector graphics instead of static bitmaps, so very small (only 56kb!) can provide any resolution.
For compatibility reasons, Metal still uses the default Swing interface appearance. But the update needed to change the appearance of the Nimbus interface is simple. Just add the following code to the main function, remember to add it first, then fill in the other code:
try {
Uimanager.setlookandfeel ("Com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
catch (Exception e) {
E.printstacktrace ();
}
You can also specify-dswing.defaultlaf=com.sun.java.swing.pl a F.nim bus on the command line. Nim makes Nimbus the default interface appearance.
One way to permanently set properties is to add code: Swing.defaultlaf=com.sun.java.swing.plaf.nimbus.nimbuslookandfeel If swing.properties This file does not exist, You must create one.
The following figure is added
The following figure is before adding