在这里下了一个:http://download.csdn.net/source/760960
不是jar文件,跟平常写的程序结构一样
导入一个工程之后,出现很多包。。
不是jar文件,跟平常写的程序结构一样
导入一个工程之后,出现很多包。。
解决方案 »
- Java的switch语句支持byte、short、char、int、long、String和enum(枚举)吗?
- 软件设计大赛
- java中继承的构造方法问题。。。。。。。。。。。
- 一个关于向文本中写数据的问题
- 用java怎样实现从计算机并口上获取数据,并以波形形式在屏幕上显示出来?
- 【请教】关于流的关闭
- 用么MediaTracker的方法在HTML中显示一幅图像,可是不行???各位大侠帮我分析一下代码吧
- 编译时出现cannot access JPanel错误
- main方法添加初级问题
- 字符串比较问题,急
- Swing 开发,JPanel之间数据共享交互问题 (JFrame与JPanel分开开发引起的问题)
- remove()移除不了组件
并将下列代码复制到main方法中运行程序即可看到美化后的效果:
try {
UIManager.setLookAndFeel("com.nilo.plaf.nimrod.NimRODLookAndFeel");
//UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceFieldOfWheatLookAndFeel");
//UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceMagmaLookAndFeel");
//UIManager.setLookAndFeel("com.birosoft.liquid.LiquidLookAndFeel");
} catch (InstantiationException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (IllegalAccessException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (UnsupportedLookAndFeelException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (ClassNotFoundException e) { }
四条语句是四种不同的界面,喜欢哪个就用哪个!!!
用Eclipse,选中工程名进入属性(property)然后选择Java Build Path——>Libraries——>Add External Jars——> 选择皮肤包所在路径
在主方法的代码前添加如下代码:
try {//皮肤包
javax.swing.UIManager.setLookAndFeel("com.jtattoo.plaf.mcwin.McWinLookAndFeel");//此句可更换为如下代码(风格不同):
} catch (Exception e) {
e.printStackTrace();
}
有以下风格可以设置:
//javax.swing.UIManager.setLookAndFeel("com.jtattoo.plaf.smart.SmartLookAndFeel");
//javax.swing.UIManager.setLookAndFeel("com.jtattoo.plaf.luna.LunaLookAndFeel");//很浅绿
//javax.swing.UIManager.setLookAndFeel("com.jtattoo.plaf.aluminium.AluminiumLookAndFeel");//灰色
//javax.swing.UIManager.setLookAndFeel("com.jtattoo.plaf.bernstein.BernsteinLookAndFeel");//太黄了
//javax.swing.UIManager.setLookAndFeel("com.jtattoo.plaf.hifi.HiFiLookAndFeel");//全黑
//javax.swing.UIManager.setLookAndFeel("com.jtattoo.plaf.mint.MintLookAndFeel");
//javax.swing.UIManager.setLookAndFeel("com.jtattoo.plaf.aero.AeroLookAndFeel");
//javax.swing.UIManager.setLookAndFeel("com.jtattoo.plaf.fast.FastLookAndFeel");//buhk
//javax.swing.UIManager.setLookAndFeel("com.jtattoo.plaf.acryl.AcrylLookAndFeel");
//javax.swing.UIManager.setLookAndFeel("com.jtattoo.plaf.noire.NoireLookAndFeel");