🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.lang.java
Article #20412

Re: ���ʹ��Look And Feel��

#20412
From: 99SE.Eric.Hsu.��̹ܿ�
Date: Thu, 18 Dec 2003 11:59
124 lines
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�����ġ�
: 
:  ��л�ˣ�
: 
: --
:      �T�r�T�p�T�T�T�p�T        �U        �d�T�T�T�T�T�T�T�s�q�T�T�j�T�j�T�T�r
:        �t �q�T�r�q�T�r �t�T�T�r�U�q�T�T�s�s�U  �U  �U  �U  �t�T�T�m�T�m�T�T�s
:      �T�r �t�T�s�t�T�s     �q�s�U�t�r      �p�T�p�T�p�T�p  �t�T�T�g  �d�T�T�s
:        �t�q�s�T�T�p�T�s  �q�s  �U  �t�r  �T�m�T�m�T�m�T�m�T�t�T�T�g  �d�T�T�s
:        �q  �U�T�T�p�T�s�t�s    �U    �t�s �U   �U  �U   �U �t�T�T�g  �d�T�T�s
:      �T�s  �s�T�T�m�T�s      �t�s         �s   �s  �t   �t       �s  �s
: 
: �� ��Դ:��Ʈ��ˮ�Ƽ� Freecity.dhs.org��[FROM: bird]


--
                It's easy to get pieces done
                It's not so easy to get done with pieces

                                        - 03.12.16.Eric
�� ��Դ:���Ұ��Ͽ�վ bbs.nankai.edu.cn��[FROM: 202.113.30.24] 
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!NanKai

Show 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