Adding buttons to the To-Do List applet user interface

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:

toldtodo.gif (3193 bytes)

You need to add two new buttons to this user interface:

To add these two buttons:

  1. Select the ToDoList class for your To-Do List applet.
  2. From the Selected menu, select Open To and then Visual Composition.
  3. The free-form surface appears. It should look like this:

    tstacon3.gif (5739 bytes)

  4. Select a JButton bean and add a button under the existing Remove button.  You may need to move your Add and Remove buttons or lengthen the free-form surface to make space for your new button.
  5. Select the button you just added and change its text to Open To-Do File.... To change the text:
  6. Follow the same procedure to add another button below JButton3. Change the text of this button to Save To-Do File...
  7. Size the new buttons to match the width of the existing buttons:
  8. Align the two new buttons with the existing Add and Remove buttons:
  9. Distribute evenly all four buttons:

You have added the two new buttons for the To-Do List program. Now you are ready to associate them with some action.