Week 10 Exercises

  1. Use the java.awt.FileDialog class and the appropriate OutputStream, InputStream, and Reader and Writer classes to make the Open, Save, and Save As commands of last week's text editing program functional. Also rename each window to the name of the file being edited (or Untitled if a new file has not yet been saved.) Finally, keep track of whether or not each window has been modified since being opened. If it has, and the user attempts to close it, then prompt them with the Yes-No-Cancel dialog box from two weeks ago to see if they want to save the file. If they answer yes, you should save the file. If they answer no, just close the window. If they answer cancel, you should not close the window or quit the program.

All exercises must be handed in.


Previous | Top
Last Modified April 8, 1997
Copyright 1997 Elliotte Rusty Harold
elharo@metalab.unc.edu