A Java UI container uses a special object called a layout manager to control how components in the container are located and sized each time the container is displayed. A layout manager automatically arranges the components in the container according to a particular set of rules specific to that layout manager. Layout managers allow you to specify rules and constraints for the layout of your UI in a way that will be portable across platforms.
dataPanel container in the client form does not include a layout manager, as shown by
<null> in the Structure window of
To use a layout manager, expand the Visual section in the Property Inspector for dataPanel, and change the layout attribute to BorderLayout:
BorderLayout layout manager arranges a container's components in one of five areas within a BorderLayout, based on the
constraints property of the component. You can set the
constraints property for the component in the Property Inspector to one of the five following values:
For example, the
constraints property for
Center, as shown in the Property Inspector:
You can also use the Constraints property visual editor to change a component's
constraints property value by selecting an appropriate box:
BorderLayout as the layout manager for the
dataPanel container, you are ready to change the
constraints property value for the container's component
panelOrdersView1Helper1 (which is the edit form panel you added previously).
The master edit form is not going to grow in size because it has a fixed number of columns (label and text field) and rows (number of attributes). In the next step you will select
panelOrdersView1Helper1 in the Structure window, and then use the Constraints property visual editor to change the
constraints property value of
panelOrdersView1Helper1 to North. This enables the edit form to always be stretched across the full width of the container.
Note: The Constraints property visual editor is located next to the Property Inspector by default. If the Constraints property visual editor is not already open, choose View Java Constraints .
Copyright © 1997, 2009, Oracle. All rights reserved.false ,,,,,,,,,,,,,,,