AWT Component: Canvas
Canvas is a simple class that is used to draw on as in artist's canvas. They cannot contain other components. This is the class on which you use the graphics methods.
Canvases can be included as parts of other Containers. In this case, you may need to obtain a Graphics object for drawing:
- Canvas drawcanvas;
- Graphics drawgraphics = drawcanvas.getGraphics();
- drawgraphics.drawString("Graph Label");