![]() |
![]() |
Since this bean does not use a layout manager, you need to clean up the appearance of your user interface by using the sizing and aligning tools from the tool bar on the Visual Composition Editor. The tool bar provides several different tools for sizing and aligning beans. You'll learn a great deal about how to use them by experimenting with the different tools.
The following steps explain how to match the size of two beans, align the beans with other beans, and evenly distribute the beans within another bean. You'll learn more about sizing and changing beans in Manipulating beans.
The order in which you size, align, and distribute the beans is not always important. Usually, you start with the upper left corner and work your way through all the beans in the window.
To size the list so it matches the width of the text field, do the following:
From the list, select JScrollPane1. Remember, you want to size the container the list is in, which is the scroll pane
Because the text field was selected last, it becomes the anchor bean for the match width operation. The width of the list is changed to match the width of the text field.
Note:
The anchor bean has solid selection handles. The other selected items have outlined
selection handles.
To size and align the Add button and the Remove button, do the following:
To align the left side of the text field, list, and labels, do the following:
By selecting the text field label last, you make it the anchor bean for the alignment operation.
You have now completely finished the user interface of your To-Do List applet.
Note:
The entire applet that you are creating is a bean. When you select Bean and then Save
Bean from the menu, you are saving the entire applet.
![]() |
![]() |