You have completed all of the steps that added logic to
the ToDoList class. Now you are ready to make modifications to the user
interface of the To-Do List applet. Your current To-Do List applet
should look like this:

You need to add two new buttons to this user interface:
- An Open To-Do File button to trigger opening a file to read
into the To-Do list
- A Save To-Do File button to trigger saving the contents of the
To-Do list to a file
To add these two buttons:
- In the Workbench, select the ToDoList class for your To-Do List
applet.
- From the Selected menu, select Open To and then
Visual Composition.
- The free-form surface appears. It should look like this:

- Select a JButton bean and add a button under the existing
Remove button. Name it ReadButton. You may need to
move your Add and Remove buttons or lengthen the
free-form surface to make space for your new button.
- Select the button you just added and change its text to Open To-Do
File. To change the text:
- Open Properties for ReadButton.
- Change the value of text to Open To-Do File
- Follow the same procedure to add another button below ReadButton.
Name it SaveButton. Change the text of this button to Save To-Do
File
- Size the new buttons to match the width of the existing buttons:
- Select AddButton. Hold down the Ctrl key and select the remaining
buttons so that all four buttons are selected. The last bean selected
has solid selection handles, indicating that it is the anchor
bean. The anchor bean is the bean that acts as the guide for
resizing or the bean that the other selected beans match.
- Select
Match Width from the tool bar.
- Align the two new buttons with the existing buttons:
- Select SaveButton. Hold down the Ctrl key and select ReadButton,
RemoveButton, and AddButton so that all four buttons are selected.
AddButton becomes the anchor bean.
- Select
Align Left from the tool bar.
- Distribute evenly all four buttons:
- Because you have all buttons already selected, click
Distribute Vertically on the tool bar.
You have added the two new buttons for the To-Do List program. Now
you are ready to associate them with some action.
