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