Chapter 10: Applets
The exercises here are taken from my forthcoming book
The Java Developer's Resource.
Quiz
- What would be the problems with writing a telnet program as an applet?
- What would be the biggest problems with trying to write a word processor as an applet?
Exercises
- 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.
- 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.
- 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.
- 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