Atitit. GUI interface Skin and skinning summary java. NET C++__.net

Source: Internet
Author: User
Tags pack

Atitit. GUI interface Skin and skinning summary java. NET C + +

1. Swing Skin 1

1.1. Windows Style 1

1.2. MAC Style (liquid frame) 1

2. How to add watermarks or backgrounds to the application. 2

3. Commonly used swing skin package substance, Jtattoo 2

C + + skin QT directly support the CSS, easy.

. NET WinForm ya ten immediately go into effect ...

Sun's design of swing takes into account the visual sense of the control (look and Feel), which is the separation of appearance and function, which allows you to download separate software and skin packs on the web for skin changes.

But swing's changing skin looks like it's going to reboot ...

Author:: Old Wow's paw Attilax Airon, email:1466519819@qq.com

Reprint please indicate the source: Http://blog.csdn.net/attilax

1. Swing Skin

1.1. Windows style

By default, the Java style is selected.
Here we'll take a look at the skin with the swing system itself:

Java code

1./**

2. * Using the skin of windows in the skin of swing's own generation

3. * Please insert the section code in the main function

4. * (Note: To place it in front of 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 frame)

Mac theme elements.

Java code

1. Uimanager.setlookandfeel ("Com.birosoft.liquid.LiquidLookAndFeel");

2. Liquidlookandfeel.setliquiddecorations (True, "Mac");


To achieve this, you simply add the code before the window starts the function. There are other settings in the liquid theme pack that provide two sets of topics that remove the Mac parameters from the code above, namely:

Java code

1. Uimanager.setlookandfeel ("Com.birosoft.liquid.LiquidLookAndFeel");

2. Liquidlookandfeel.setliquiddecorations (TRUE);

To change the title bar in fact, just one sentence is enough, is to add a sentence in the Main method:

Jframe.setdefaultlookandfeeldecorated (TRUE);

If you want to let JDialog also change, but also add: jdilog.setdefaultlookandfeeldecorated (TRUE);

2. How to add watermarks or backgrounds to the application.

Refer to the use of swing skin pack substance-winning log-NetEase blog. htm

3. commonly used swing skin package substance, Jtattoo

Play Cool Java interface Development Learn notes "three" use swing skin Mechanism-Mr. Codex-Iteye Technology 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.