Connecting the Save To-Do File button

You are now ready to make the final connection from the Save To-Do File button.

The To-Do List applet should call the writeToDoFile() method when a user selects the Save To-Do File button. To implement this, you must connect SaveButton to the writeToDoFile() method.

  1. Select SaveButton and click mouse button 2.
  2. Select Connect and then actionPerformed from the pop-up menu that appears.
  3. Click mouse button 2 on the free-form surface. From the pop-up menu that appears, select Event to Code.
  4. In the Event to Code window, select writeToDoFile(). The free-form surface should look like this:
    Free-form surface, showing both new code connections

Congratulations! You have completed the connection from the Save To-Do File button. Your To-Do File program is complete and you are ready to test it.