This applet uses a text field to input a character stream from the user. The applet can
then count the number of uppercase and  lowercase letters, the number of digits, punctuation 
marks, and spaces. The field may also be cleared to start again.

View applet's source code