In Java, this method is a component to a form, it is different from the other GUI systems we have used.
First, it is full code; there is no "resource" to control the placement of components.
Second, the component of the method is placed in a form that is controlled by the layout manager, and the layout manager places the component according to the decisions we add (). Size, shape, and component locations are significantly different from the layout managers of other systems. In addition, the layout manager makes our patches or applications fit the size of the window, so if the size of the window changes (for example, the specification specified in the HTML page's program), the size, shape, and position of the component change.
Both the program slice and the frame class originate from the container that contains and displays the component. (This container is also a component, so it can respond to events as well.) In the container, calling the SetLayout () method allows me to select a different layout manager.
In this section we'll explore different layout managers and put buttons on top of them. There is no event to capture the button, just to show how to lay out the buttons.