The so-called layout manager is divided into a variety of, the most common streamliner (FlowLayout), Border Layout Manager (BorderLayout), and GridLayout. 1. Flow Layout Manager is placed on Frame or other components, discharges from left to right, sequentially, and sequentially placed in the center of the center from left to right, discharge from left to right. As shown below (this is added to Frame, because the default layout manager of Frame is not flowLayout, so the modification will be described later later):
When Frame is large, the 5 Button is placed in the middle of the frame, and the frame is arranged, and when the frame is reduced, the status of the following figure is displayed:
Five Button is always emissive, but it is only emissions when you can't put it in a row. 2. Boundary layout manager divides the plates into five directions in the North and West. Each time you add a component to specify the orientation of the component, place the components in the four directions of the North and West to place the sticker, as shown below:
When pulling a large Frame, the components in the center are constantly returning to the four directions in the north and south. As shown in the figure below, Button4 and Button3 are only elongated and the width is unchanged, but Button1 and Button2 are just pulling, And the length is unchanged, but Button5 is a change in growth:
3. Table layout manager is a few lines of several columns to place the components onto Frame. Several components are also placed, as shown in the following figure, 6 Button Press 2 line 3 columns:
The result of pulling Frame is as follows:
Note: Frame's default layout manager is boundary layout manager, Panel's default layout manager is a streamlined manager.