Saving and testing the completed To-Do List program

Now that you have completed the enhanced To-Do List program, you are ready to save and test it.

To save and test your completed To-Do List program:

  1. Select Save Bean from the Bean menu to save your changes. VisualAge for Java generates the code to implement all the work you have done in the Visual Composition Editor since the last time you saved.
  2. Select Run from the tool bar.
  3. Try creating and saving a new To-Do file:
  4. Now try loading the list from test1.txt. Select Open To-Do File. An open file dialog should appear. Select test1.txt, then select Open. The original list from test1.txt should be loaded into To-Do List.
  5. Now try replacing the current list with the one you saved in test2.txt. Select Open To-Do File. Select test2.txt, then select Open. The list from test2.txt should replace the test1.txt list in To-Do List.

Congratulations! You have completed a Java program that combines a user interface created in the Visual Composition Editor with nonvisual code that you created directly.

Before you continue, create a versioned edition of the ToDoList class.

  1. Select the ToDoList class in the Workbench. Select Manage and then Version from the Selected menu. The Versioning Selected Items SmartGuide appears.
  2. Ensure that Automatic is selected and select Finish.