Java Learning Note 2

Source: Internet
Author: User

5.1 Graphical user interface (GUI)

GUI is a graphic way, the use of menus, buttons and other standard interface elements and mouse operation, to help users easily to the computer system to issue instructions, start the operation, and the results of the system run the same way to display the user's technology.

AWT (Abstract Window Toolkit)
AWT is an abstract window toolkit, which is the Java language API for building a graphical user interface. Its

Key features include:

? User interface Components
? Event Processing Model
? Graphics and imaging tools
? Layout Manager

Packages related to the graphical user interface
Z java.awt classes related to drawing
Z java.awt.event classes related to event handling
Z javax.swing classes related to swing components

Container

There are two main types of swing containers commonly used:
Z Top-level container: A container that contains other components and containers.
Each application should have a top-level container. Main
To have: Jframe, JApplet and JDialog.
Z Generic container: Refers to the middle tier container. There are mainly JPanel,
JScrollPane (panel with scroll bar) and JToolBar.

Places to be aware of using top-level containers
Z each GUI component must be in one and only one capacity
The device.
Z Each top-level container contains a content pane
(Content pane), all components must be placed
In the Contents pane.
Z can add a menu bar to the top-level container, which will
The contract position of the top-level pane.

Java Learning Note 2

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.