Java The Complete Reference, Seventh Edition

(Greg DeLong) #1
Outputting to the Console
Although output to an applet’s window must be accomplished through GUI-based methods,
such asdrawString( ), it is still possible to use console output in your applet—especially for
debugging purposes. In an applet, when you call a method such asSystem.out.println( ),
the output is not sent to your applet’s window. Instead, it appears either in the console
session in which you launched the applet viewer or in the Java console that is available in
some browsers. Use of console output for purposes other than debugging is discouraged,
since it violates the design principles of the graphical interface most users will expect.

636 Part II: The Java Library

Free download pdf