Chapter 13th Swing Program components

Source: Internet
Author: User

1. Swing overview

  The GUI (graphical user interface) provides a graphical interface for the program, originally designed to build a common GUI for programmersto run on all platforms . However, the basic class AWT(Abstract window Toolbox) in Java 1.0 did not meet this requirement, so Swing appeared, which is an enhanced component of the AWT component, but it does not completely replace the AWT components . Both of these components need to appear in a graphical user interface at the same time .

2. Swing Features

Swing components are often referred to as "lightweight components" because they are written entirely in the Java language, and Java is a language that does not depend on the operating system, and it can run on any platform, whereas a component that relies on the local platform is called a "heavyweight component". For example, the AWT component is a window system that relies on the local platform to determine the functionality, appearance, and style of the GUI components. Swing has the following main features:

1) Lightweight components

2) Pluggable appearance components

3. Swing Package

  

Detailed illustrations:

  

Most GUI components in swing components sick a direct subclasses or indirect subclasses of the component class, and the JComponent class is where the various features of the swing component reside, including component boundaries and automatic scrolling of GUI components.

  

Chapter 13th Swing Program components

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.