Chapter 10: Applets

The exercises here are taken from my forthcoming book The Java Developer's Resource.

Quiz

  1. What would be the problems with writing a telnet program as an applet?
  2. What would be the biggest problems with trying to write a word processor as an applet?

Exercises

  1. Modify Program 10.2 so that it does not need AppletHeight or AppletWidth variables or their equivalents. Hint: you won't need to import java.awt.Dimension either.
  2. Assume that each letter occupies a box fifteen pixels wide by fifteen pixels high. Write an applet which takes a single letter as a parameter and fills the available space with that letter.
  3. The PoetryApplet handles at most 100 lines because that is all the space that's been allotted to the poem array. Adjust the PoetryApplet so that it includes a numlines parameter that will set the size of the poem array at runtime.
  4. Change the PoetryApplet to use a Vector rather than an array so that it will truly handle an arbitrary number of parameters.


[ Exercises | Cafe Au Lait | Books | Trade Shows | Links | FAQ | Tutorial | User Groups ]

Copyright 1996 Elliotte Rusty Harold
elharo@sunsite.unc.edu
Last Modified August 20, 1996