Prev Up Next
Go backward to The Context of an Applet
Go up to Top
Go forward to Methods for Handling Events

Drawing Methods and the "pen"

All of the drawing methods provided by JavaTools are associated with a "pen". There is a pen associated with your applet itself. This pen can be used to draw on the background of the applet (i.e. anywhere that you have not placed a button, scrollbar or other component). If the components you add to your applet include any subcanvases, then there will be an additional "pen" associated with each subcanvas. The pen associated with your applet is simply named "pen". The pen associated with a subcanvas is referenced by combining the name of the subcanvas with ".pen". Thus, if you had added a subcanvas named, "graphArea" to your applet, its pen would be called "graphArea.pen".

  • The Graphic Coordinate System
  • Drawing with Colors
  • Drawing Methods

  • Prev Up Next