Adding animations and sounds to a Web page are both wonderful examples
of what Java can do, but Java really shines when it comes to interacting
with a user. Drawing an image is one thing, but allowing the user to click
different sections of it and have the applet respond is quite another.
Java can accept both mouse and keyboard input; the decision on how to use
this capability is completely up to the programmer of the applet. Suppose
you were working on a calculator applet, and you had a keypad on therumuscinta
screen that users could click to enter numbers. Users might also want to be
able to type numbers from their keyboards. No problem. Applets can
accept input from the mouse and keyboard; Java applets can be as flexible
as you need them to be.