Prev Up Next
Go backward to The APPLET Tag
Go up to Top
Go forward to Drawing Methods and the "pen"

The Context of an Applet

The width and height attributes of the APPLET tag reserve a rectangular region of a browser's window for use by the applet. JavaTools provides simple primitives to allow your applet to use this rectangle. Your applet can instruct the browser to draw text, lines and simple shapes within this rectangle using primitives associated with the "pen" provided by JavaTools. You can also place Graphic User Interface (GUI) components such as menus, scrollbars and buttons within this rectangle and respond when the viewer interacts with these components. In addition, you can place one or more sub-canvases within the applet's rectangle to provide drawing areas that are guaranteed not to overlap with any of the GUI components used.

The drawing of text, lines and shapes within an applet or a subcanvas placed within an applet is accomplished through a set of drawing methods associated with the "pen" associated with the applet or subcanvas.


Prev Up Next