12th. Graphical Interface Basics
1. is that class the root of the Java GUI component? is the container Class A subclass of component? Which class is the root of the swing GUI build?
Java.awt.component is the root of all Java GUI component classes.
A container class, such as JFrame, is a subclass of a component.
JComponent is the root of the Swing GUI component class.
2.AWT components different from swing build?
The components of AWT are heavy and swing components are lightweight.
You can add a button to a frame.
You can add a frame to the panel.
You can add a panel to a frame.
You can add any number of components to a panel, a frame, or a small program.
You can pass parameters from the Jpanel,jframe class, or from the.
The default layout manager for the framework is BorderLayout
The default layout manager for the panel is FlowLayout
GUI components such as JButton can only be added to a container and appear only once in one container. Adding multiple times is invalid.
Only icons and borders can be shared in GUI components, and buttons cannot be shared.
"Fundamentals of Java language Programming"--basic graphical user interface--some summary