Article View: cn.bbs.comp.lang.java
Article #20412Re: ���ʹ��Look And Feel��
From: 99SE.Eric.Hsu.��̹ܿ�
Date: Thu, 18 Dec 2003 11:59
Date: Thu, 18 Dec 2003 11:59
124 lines
6865 bytes
6865 bytes
Oh well, I'm using SkinLF, I will show you how to get it work.
Since it's been a long time that I haven't used JBuilder 7, I
will tell you how I get it work with JBuilder 9, I think it's
much the same in JBuilder 7. Ok, let's start:
. Get the SkinLF package, extract them, the only stuff you
need most is the "skinlf.jar"
. JBuilder 9 -> Tools -> Configure JDKs, then, use "Add"
button to add the "skinlf.jar" to the current version of
JDK you're using inside the JBuilder 9 (I'm using 1.4.2,
then I add it to it's class path, so that JBuilder can
use the "skinlf.jar" when compiling)
. Since SkinLF is the "bridge" between the java swing
look & feel and the gtk (http://www.gtk.org) themes (Skin-
LF loads the gtk theme pack for swing's gui, that's why I
call it the "bridge"), we now need to get some gtk theme
packs, such as the one you metioned - "SwingSet2". In fact
It's name is "aquathemepack":)
You can get lots of theme packs from the website you've
found the "aquathemepack", they're released in zip format
like - "aquathemepack.zip".
. Next, you might create a directory inside your JBuilder's
project, assume that we have a "MyProject" project, then,
we might put those theme packages we enjoy into that direc-
tory, for example:
. Path/To/MyProject/
. MyProject.jpx
. classes/
. src/
. ...
. SkinLFThemePack/
. aquathemepack.zip
. themepack.zip
. ...
. Ok, everything is ready now, you can add the following
lines to your application's main method:
public class MyApp {
// Your code here...
public static void main (String [] args) {
// Your code here...
try {
SkinLookAndFeel.setSkin(SkinLookAndFeel.loadThemePack(
"SkinLFThemePack/aquathemepack.zip"));
UIManager.setLookAndFeel(
"com.l2fprod.gui.plaf.skin.SkinLookAndFeel");
}
catch (Exception e) {
e.printStackTrace();
}
// Your code here...
}
}
// Hope it helps :)
�� �� bird.bbs@Freecity.dhs.org (��ˮ�У��������...) �Ĵ������ᵽ: ��
: �� ��: ���ʹ��Look And Feel��
: ����վ: Ʈ��ˮ�Ƽ� (Thu Dec 18 18:43:09 2003)
: ת��վ: NanKai!news.happynet.org!news.ccie.net.cn!Freecity
:
:
: Ŀǰ����������һ��pp�Ľ��棬�Ѿ�������Skin Look And Feel��
: �����JavaĿǰ����һ�ϲ�ͨ����֪������ô���֡�
:
: ������http://www.l2fprod.com/poweredbyskinlf.php���кܶ�screenshots��
: �dz�ϲ������SwingSet2�����ַ��
: http://javootoo.l2fprod.com/plaf/skinlf/screenshot_skinlf.gif
: �����ҳ���е����Ӹ�ḻһ�㣬�����ǰ�ť��
:
: �ҵ�һ�νӴ�Java������������JBuilder 7��
: �����ǰ�ǰ������һ�������������ģ�Ŀǰ����ij�SwintSet���ַ��
:
: ��֪����λ��û�����ù��ܲ��ܸ����ṩһ���ⷽ��ľ��飿
: ������������ϸ�����Ͼ���ˡ�
:
: �Ҷ�Java��������������·�ĽΣ��й�Look And FeelĿǰֻ֪��
: ����ͨ��UIManager.setLookAndFeel(...)����
:
: ������SkinLF֮�����ѹ�ˣ�����lib��src�ȣ�
: ��һ�ѵ�.jar��.class��.java�ļ�����֪�����������JBuilder 7��ʹ���أ�
:
: ����������û���κ�Java�������ˣ�����뾡��ﵽ��ǰ����˵��Ŀ�ģ�
: ����������JBuilder��ʹ�õ����ṩ�İ������г���Ľ��棩
: Ӧ������ȥѧϰ����ʲô�õIJο����ϣ����������Դ���룩��
:
: ���⣬�һ���һ�����������⣬SwingSet��ʲô������
: �����û��Դ��ģ�����еĻ����ҿ��Բο�һ��������ôʹ��SkinLF�����ġ�
:
: ��л�ˣ�
:
: --
: [0;37;40m [0;1;33;40m�T�r�T�p�T�T�T�p�T[36m �U [35m�d�T�T�T�T�T�T�T�s[32m�q�T�T�j�T�j�T�T�r[0;37;40m
: [0;1;33;40m �t �q�T�r�q�T�r [36m�t�T�T�r�U�q�T�T�s[35m�s�U �U �U �U [32m�t�T�T�m�T�m�T�T�s[0;37;40m
: [0;1;33;40m�T�r �t�T�s�t�T�s [36m �q�s�U�t�r [35m �p�T�p�T�p�T�p [32m�t�T�T�g �d�T�T�s[0;37;40m
: [0;1;33;40m �t�q�s�T�T�p�T�s[36m �q�s �U �t�r [35m�T�m�T�m�T�m�T�m�T[32m�t�T�T�g �d�T�T�s[0;37;40m
: [0;1;33;40m �q �U�T�T�p�T�s[36m�t�s �U �t�s[35m �U �U �U �U [32m�t�T�T�g �d�T�T�s[0;37;40m
: [0;1;33;40m�T�s �s�T�T�m�T�s[36m �t�s [35m �s �s �t �t [32m �s �s[0;37;40m
:
: [m[1;31m�� ��Դ:��Ʈ��ˮ�Ƽ� Freecity.dhs.org��[FROM: bird][m
--
It's easy to get pieces done
It's not so easy to get done with pieces
- 03.12.16.Eric
[m[1;33m�� ��Դ:���Ұ��Ͽ�վ bbs.nankai.edu.cn��[FROM: 202.113.30.24][m
Technical Details
Message-ID:
<49h02f$A0M@bbs.nankai.edu.cn>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!c03.atl99!news.webusenet.com!ngpeer.news.aol.com!feed2.newsreader.com!newsreader.com!maily.cic.tsinghua.edu.cn!news.happynet.org!NanKaiShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f6cb0,4f0910afc47955fb,start X-Google-Attributes: gidf6cb0,public X-Google-ArrivalTime: 2003-12-18 04:01:58 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!c03.atl99!news.webusenet.com!ngpeer.news.aol.com!feed2.newsreader.com!newsreader.com!maily.cic.tsinghua.edu.cn!news.happynet.org!NanKai From: OtherVoices.bbs@bbs.nankai.edu.cn (99SE.Eric.Hsu.��̹ܿ�) Newsgroups: cn.bbs.comp.lang.java Subject: Re: ���ʹ��Look And Feel�� Date: 18 Dec 2003 11:59:27 GMT Organization: �Ұ��Ͽ�վ Message-ID: <49h02f$A0M@bbs.nankai.edu.cn> X-Filename: Java/M.1071747209.A Lines: 124