Basic knowledge of Java GUI graphical user interface programming

Source: Internet
Author: User
Tags abstract

Java GUI programming (Graphic user Interface, graphical user interface) is implemented on its Abstract Window Toolkit (abstract Windows TOOLKIT,AWT). java.awt is the AWT Tool class library, which includes rich graphics, user interface components, and layout manager support.

The GUI is mainly used in two places:

Application;

Applet.

1 GUI Interface:

A control panel in which a user interacts with a program, containing a menu, control (or component), and a container that responds to the user's events.

There are a wide variety of window systems, and different Windows systems provide a big difference to the program libraries that are programmed, for example, Windows-based SDK, and Xlib of the UNIX platform based on X windows.

In order for the program to run under different window systems, Java proposes the concept of "abstract Window System", which provides the AWT (Abstract window Toolbox) that enables Java to run under different window systems.

2 GUI implementation in Java:

Use AWT (abstract window toolset) to make the GUI suitable for different OS environments.

Features are as follows:

① its implementation is explained by the OS under the target platform, which results in different effects of the Java GUI on different platforms (the display of window appearance, font, etc.).

② components should not use absolute positioning in design, but should use Layout manager to achieve relative positioning to achieve platform and device-independent.

3 New Swing GUI components

AWT components and event responses are not as rich as Microsoft's SDK (because some OS platforms do not have Microsoft's Windows components), Sun has added swing GUI components to JAVA2. However, AWT is simple and features can meet most of the interface requirements, especially in Java applets designed to be widely used. At the same time, this discussion has also laid a solid foundation for us to further study the swing GUI components.

Related Article

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.