Java中的UIManager简单实用(皮肤包)

感谢大佬:https://blog.csdn.net/u010022051/article/details/52671860

注:具体详情请查阅Java API文档

/**
* 设置图形界面外观
* java的图形界面外观有3种,默认是java的金属外观,还有就是windows系统,motif系统外观.
* 1、Metal风格 (默认) UIManager.setLookAndFeel(“javax.swing.plaf.metal.MetalLookAndFeel”);
* 2、Windows风格 UIManager.setLookAndFeel(“com.sun.java.swing.plaf.windows.WindowsLookAndFeel”);
* 3、Windows Classic风格 UIManager.setLookAndFeel(“com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel”);
* 4、Motif风格UIManager.setLookAndFeel(“com.sun.java.swing.plaf.motif.MotifLookAndFeel”);
* 5、Mac风格 (需要在相关的操作系统上方可实现) String lookAndFeel = “com.sun.java.swing.plaf.mac.MacLookAndFeel”;UIManager.setLookAndFeel(lookAndFeel);
* 6、GTK风格 (需要在相关的操作系统上方可实现) String lookAndFeel = “com.sun.java.swing.plaf.gtk.GTKLookAndFeel”;UIManager.setLookAndFeel(lookAndFeel);
* 7、可跨平台的默认风格 String lookAndFeel = UIManager.getCrossPlatformLookAndFeelClassName(); UIManager.setLookAndFeel(lookAndFeel);
* 8、当前系统的风格 String lookAndFeel = UIManager.getSystemLookAndFeelClassName(); UIManager.setLookAndFeel(lookAndFeel);

这是设置图形界面外观的.java的图形界面外观有3种,默认是java的金属外观,还有就是windows系统,motif系统外观.
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
这是把外观设置成你所使用的平台的外观,也就是你这个程序在哪个平台运行,显示的窗口,对话框外观将是哪个平台的外观.

补充:
https://blog.csdn.net/changemyself/article/details/675473
https://blog.csdn.net/sinat_37765046/article/details/79077644
https://blog.csdn.net/starcrm/article/details/52576379
Substance使用: https://blog.csdn.net/nospeak/article/details/83802445
Substance下载:https://www.mvnjar.com/org.java.net.substance/substance/jar.html

posted @ 2019-12-01 16:44  超级小白龙  阅读(1518)  评论(0编辑  收藏  举报