cha*_*ite 0 java swing look-and-feel nimbus
我在我的java应用程序中设置了外观和感觉nimbus,但我不知道为什么视图总是从一帧到另一帧不同.在一个框架中,我得到了非常好的蓝色雨云,而在其他框架中我得到了灰色的那个,但这不合适.而另一个没有显示为使用灵气的外观和感觉.这是我在main中使用的代码
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.
}
Run Code Online (Sandbox Code Playgroud)
我也导入
import javax.swing.*;
import javax.swing.UIManager.LookAndFeelInfo;
Run Code Online (Sandbox Code Playgroud)
我希望有人可以帮助我,谢谢.