Vista皮肤外观和感觉

3

在网上是否有免费的Java Vista外观主题包?

3个回答

2
我猜想您想要的是,无论在哪个平台上启动应用程序,都希望使用系统的外观和感觉。这可以通过以下方式实现:
UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );

在main()方法中(当然,您需要处理可能的异常;-)。
由于我这里没有vista安装,所以无法检查jvm是否原生支持vista laf...
编辑:通过上述语句似乎是可能的。请参阅java论坛中的此主题: http://forums.sun.com/thread.jspa?threadID=5287193&tstart=345

0
如果您使用SWT,它内置了Vista本地外观。然而,如果您正在使用swing,则我真的不知道。

0

在Vista上使用Java6u13可以展示出一个相当不错的Windows LookAndFeel。而且这是Java本身就具备的免费功能。

Sun has a tutorial on LookAndFeel usage here and if you want to play with the SwingSet demo, it shows you the System LookAndFeel and lets you change it. Then you can get an idea of what the LookAndFeel looks like. Calling

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
as dhiller suggests, will set the look and feel based on your system. If you wanted to see what the Vista look and feel looks like, you'll need Vista though.

另一个选择是使用SubstanceNimbus,如果你想要与Metal外观和感觉不同的东西。 Substance是一个单独的外观集合,Nimbus在6u10版本中可用。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接