我尝试使用函数来更改我的 java 应用程序的外观,但它对我的/buttonsUIManager.setLookAndFeel
的视觉外观没有影响。JFrame
我使用Netbeans 7.4
并且我的应用程序是Java Swing Desktop Application
.
/**
* Main method launching the application.
*/
public static void main(String[] args) {
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
} catch (Exception e) {
System.out.println(e.getMessage());
}
System.out.println("init");
launch(JavaMysqlTestApp.class, args);
}
我用了
com.sun.java.swing.plaf.motif.MotifLookAndFeel
javax.swing.plaf.metal.MetalLookAndFeel
com.sun.java.swing.plaf.gtk.GTKLookAndFeel
UIManager.getSystemLookAndFeelClassName()
UIManager.getCrossPlatformLookAndFeelClassName()
但他们都没有改变我公司的任何外观。我怎样才能使这个功能生效?