Laying out components using the visual editor
Use the visual editor for Java to visually arrange and lay out visual components in your Java application.
When you create a visual class using the visual editor, and when you add components to it, the visual editor for Java sets default appearances for the layout of containers and alignment of components within those containers. Part of designing an application is making the user interface easy to use, intuitive, well-organized, and visually appealing. You will want to customize the layout and alignment of your application to make it fit your needs.
You can use the visual editor to develop applications using Swing, AWT, or SWT. Each of these styles comes with useful container layout managers and alignment controls. The visual editor helps you to work with these layout managers and makes it easy to visually lay out your application.
Using null layout
Rather than using a layout manager that controls the size and position of all components in a container, you can set the layout manager to null. Each component then controls its own position and size using its bounds.Aligning components using X/Y alignment
When you set the layout property for a component to null, you can use the Customize Layout window to align components based on their boundaries.Specifying a layout manager
You can specify a layout manager for a container to help you manage the layout and organization of the visual components within that container.Layout managers and containers
Layout managers are objects that control the size and position of components within a container.Swing and AWT layout managers
You can work with Swing and AWT layout managers with the visual editor for Java.SWT layout managers
You can work with SWT layout managers with the visual editor for Java.
Parent topic
Developing Java classes with the visual editor