Atitit. Gui skin and skin replacement summary java. net c ++, atitit.gui.net

Source: Internet
Author: User

Atitit. Gui skin and skin replacement summary java. net c ++, atitit.gui.net

Atitit. Gui skin and skin replacement summary java. net c ++

 

 

1. Swing skin 1

1.1. windows style 1

1.2. Mac style (liquid framework) 1

2. How to add a watermark or background to an application? 2

3. Common swing skin package substance, JTattoo 2

 

C ++ skin qt directly supports css, easy ..

. Net winform ya ten immediately take effect...

 

Sun considers the view And Feel of the control when designing Swing, that is, the appearance And function separation. It can download independent software And skin packages online for skin replacement.

However, it seems that the change of swing skin will take effect after the restart...

 

Author: old wow's paw Attilax iron, EMAIL: 1466519819@qq.com

Reprinted please indicate Source: http://blog.csdn.net/attilax

 

1. Swing skin

 

1.1. windows style

By default, the java style is used.
Here we will first illustrate the skin that comes with the swing system:

Java code

1 ./**

2. * use WINDOWS skin in SWING's own skin

3. * Insert the code segment in the main function.

4. * (Note: place it before the window Definition Statement)

5 .*/

6. try {

7. javax. swing. UIManager. setLookAndFeel ("com. sun. java. swing. plaf. windows. WindowsLookAndFeel ");

8.} catch (Exception e ){

9. e. printStackTrace ();

10 .}

 

1.2. Mac style (liquid Framework)

Mac topic element.

Java code

1. UIManager. setLookAndFeel ("com. birosoft. liquid. LiquidLookAndFeel ");

2. LiquidLookAndFeel. setLiquidDecorations (true, "mac ");


To achieve the above effect, you only need to add the code before the window starts the function. There are other settings in the liquid topic package. Two sets of themes are provided to remove the mac parameters in the above Code, namely:

Java code

1. UIManager. setLookAndFeel ("com. birosoft. liquid. LiquidLookAndFeel ");

2. LiquidLookAndFeel. setLiquidDecorations (true );

 

To change the title bar, you only need to add one sentence in the main method:

JFrame. setdefalooklookandfeeldecorated (true );

If you want to change JDialog, add JDilog. setdefalooklookandfeeldecorated (true );

 

2. How to add a watermark or background to an application?

Refer to how to use the Swing skin package substance-log obtained by Zhizhi-wangyi Boke .htm

 

3. Common swing skin packages: substance, JTattoo

 

 

Cool Java interface development and learning notes [3] Using Swing skin mechanism-bag.tar.tar.htm-iteyetechnical website .htm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.