Tame Tiger: When Ocean and synth meet metal

Source: Internet
Author: User
Tags abstract

Official release: September 30, 2004, Java 2 Development Toolkit version 5.0 (yes, the previous JDK) was unveiled. As part of the new platform, you can get two new face objects that allow you to change the usage and appearance of your program. Ocean is the new default appearance of Java, which replaces the original Metal version. Synth is a new thing that provides a description of the appearance through an external XML file.

Ocean detailed

After discarding the 1.4 default old Metal appearance, in the Java Runtime Environment 5.0, you already have a new, Ocean look. But Ocean is not a whole new look. Ocean did not redesign a new look from scratch, but was used as a new theme for the Metal appearance. This means that if you have customized the Metal appearance, your program will look the same at 5.0. If you use a new Ocean theme, the program will look different.

If you are unfamiliar with the topic, the abstract class Metaltheme provides a way to use colors and fonts for abstract skins. In fact, by changing the theme, you can change the appearance of the effect. And, that's what Ocean going to do. Because of this, Ocean is not a "real" look. Instead, the Oceantheme class provides a softer look for Swing. Use the SwingSet2 Demo as a wizard to compare the original theme of the Meta appearance in Figure 1 with the Ocean theme of the Metal appearance in Figure 2: Steel

Figure 1. The Steel theme of Metal

Figure 2. The Ocean theme of Metal

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.