java的原始界面真的惨不忍睹,不过我们可以通过以下简单的方法使界面的视觉效果发生质的改变O(∩_∩)O~~~
在主界面类前导入:
在public static void main(String args[]){}中粘贴如下代码:
在主界面类前导入:
import javax.swing.UIManager;
在public static void main(String args[]){}中粘贴如下代码:
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
//UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
//UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
//UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
//UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
}
catch(Exception e){
e.printStackTrace();
}