用swing做的窗体程序,想换个好看的皮肤,从网上下载了很多的.jar包,了解到这样换皮肤javax.swing.UIManager.setLookAndFeel("com.jtattoo.plaf.noire.NoireLookAndFeel"); ,
但是纳闷的是有的jar 包里面没有lookandfeel这个类啊,那该怎么换皮肤呢?
------解决方案--------------------
一般来说,jdk自带的Nimbus够用了:
- Java code
try { for(LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { UIManager.setLookAndFeel(info.getClassName()); break; } }} catch (Exception e) { // If Nimbus is not available, you can set the GUI to another look and feel.}