To: The Summer 1998 CS 299 -Programming in Java- Class
From: Clifton, Scanlan
Date: June 15, 1998
RE: Program 3
Due Date: June 24, 1998 -Start of class
Grace Date: June 26, 1998 - 3:15 p.m., Slide it under my door if I am not there!
Points: 25



You must turn in:
  • A) A diskette with TStory.java and TStory.html in the top-level directory
  • B) A print-out of your TStory.java file (class name is TStory)



    Do exercise 8.9 (page 461) modified as follows:
    Have a button that, when clicked, generates a story of random length from 3 to 20 sentences and puts those sentences in a TextArea.

    For the TextArea:
  • a) Use the constructor(p586): public TextArea (int rows, int columns)
  • b) Make it so the text area is not editable (see top of page 587)
  • 3) A couple of useful methods:
  • setText(String) - sets the TextArea's text to the specified String
  • append(String) - appends the given String to the TextArea

    As always, you MUST have several appropriate methods - no one method should be very long. Break it into small, well-focused pieces.