First, the layout
1. Components
An object that is graphically displayed on the screen, interacting with the user, is called a component.
Components include: menus, labels, text boxes (password boxes), scroll bars, radio, check, buttons, and so on.
2. Containers
Components cannot be displayed independently, only the assembly can be placed in a container for normal display.
Arranging and distributing components in a container in a reasonable and orderly manner, including the position and size of the component, is called layout.
Second, layout manager
Each container has its own layout manager, and when a component within a container needs to change its properties, it needs to call the layout manager of the container in which its components reside.
The common layout managers in AWT are:
Boundary Layout Manager BorderLayout
Streaming layout manager FlowLayout
Grid Layout Manager GridLayout
Java Graphical user interface (GUI) notes (i) Introduction