(JAVAGUISwing programming, Java GUI programming (GraphicUserInterface, graphical user interface), is implemented on its abstract window toolkit (AbstractWindowToolkit, AWT), java.awt is AWT's tool class library, which includes rich graphics, user interface Support for interface elements and design managers. GUI is mainly used in two places: ◆Application; ◆Applet. 1) GUI interface: In JavaGUI, a control panel that interacts between the user and the program, which includes menus, controls (or components), containers, and can call the user's affairs. Nowadays, there are various window systems, and different window systems provide very different libraries for programming, for example, Windows-based SDK, and Unix-based XWindows' Xlib. In order to make programs run under different window systems, Java proposes the concept of "general window system" and provides AWT (general window toolbox), which enables Java to run under different window systems. 2) GUI implementation method in Java: choose AWT (General Window Toolset) and then make JavaGUI suitable for different OS environments to create a multi-system user interface. The features are as follows: 1. Its detailed implementation is explained by the OS in the scheme mode, and then the JavaGUI will show different running effects in different modes (the display effects of window appearance, fonts, etc. will change). ② The component should not be designed with positive positioning, but should use the design manager to achieve relative positioning, so as to be independent of the method and equipment. 3) The newly added JavaSwingGUI component AWT component and the event response are not as rich as Microsoft's SDK (because some OS methods do not have Microsoft's Windows components), Sun added a new SwingGUI component in Java2. However, AWT is relatively simple, and its functions can meet the needs of most user interfaces, especially in the design of JavaApplet. At the same time, this comment also laid a solid foundation for everyone to further study SwingGUI components.
Java 2 GUI Fundamentals with Swing.pdf)