我如何在Java中设置LookAndFeel文件? [英] How can I setup LookAndFeel Files in Java?

查看:166
本文介绍了我如何在Java中设置LookAndFeel文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在JDK 1.6中设置LookAndFeel文件。
我有两个文件:


  1. napkinlaf-swingset2.jar


  2. napkinlaf.jar


如何设置并使用它?



我想要一个GTK的外观和感觉,或Qt的外观和感觉,它们是否可用?

解决方案 div>

Naplin的类名是 net.sourceforge.napkinlaf.NapkinLookAndFeel 。因此,要在命令行中将其设置为默认值,请使用:

 java -Dswing.defaultlaf = net.sourceforge.napkinlaf.NapkinLookAndFeel 

要安装它,请将 napkinlaf.jar 添加到 lib / ext 方向和线条:

 swing.installedlafs =餐巾
swing.installedlaf.napkin.name =餐巾
swing.installedlaf.napkin .class = net.sourceforge.napkinlaf.NapkinLookAndFeel

lib / swing.properties 安装(您可能需要创建该文件)。



请参阅餐巾维基页面


I need to setup LookAndFeel Files in JDK 1.6. I have two files:

  1. napkinlaf-swingset2.jar

  2. napkinlaf.jar

How can I set this up and use it?

I would like a GTK look and feel OR Qt look and feel, Are they available?

解决方案

The class name for Naplin is net.sourceforge.napkinlaf.NapkinLookAndFeel. So to set it as default on the command line, use:

java -Dswing.defaultlaf=net.sourceforge.napkinlaf.NapkinLookAndFeel

To install it add napkinlaf.jar to the lib/ext direction and the lines:

swing.installedlafs=napkin
swing.installedlaf.napkin.name=Napkin
swing.installedlaf.napkin.class=net.sourceforge.napkinlaf.NapkinLookAndFeel

to lib/swing.properties within your Java installation (you'll probably have to create the file).

See the Napkin wiki page

这篇关于我如何在Java中设置LookAndFeel文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆