1 | This simple layout manager "flows" components into the window. The components can be aligned, and space between them specified by arguments hgap and vgap: |
2 | setLayout(new FlowLayout(FlowLayout.LEFT, 5, 2)); |
3 | setLayout(new FlowLayout(FlowLayout.CENTER)); |
4 | setLayout(new FlowLayout(FlowLayout.RIGHT)); |
5 | The FlowLayout Manager's strategy includes making each component its default "preferred size". |