<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.awt.Canvas
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.html">This Package</a>  <a href="java.awt.Button.html#_top_">Previous</a>  <a href="java.awt.CardLayout.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.awt.Canvas
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----<a href="java.awt.Component.html#_top_">java.awt.Component</a>
           |
           +----java.awt.Canvas
</pre>
<hr>
<dl>
  <dt> public class <b>Canvas</b>
  <dt> extends <a href="java.awt.Component.html#_top_">Component</a>
</dl>
A <code>Canvas</code> component represents a blank rectangular 
 area of the screen onto which the application can draw or from 
 which the application can trap input events from the user. 
 <p>
 An application must subclass the <code>Canvas</code> class in 
 order to get useful functionality such as creating a custom 
 component. The <code>paint</code> method must be overridden 
 in order to perform custom graphics on the canvas.
<p>
<hr>
<a name="index"></a>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Canvas()"><b>Canvas</b></a>()
  <dd> 
 Constructs a new Canvas.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#addNotify()"><b>addNotify</b></a>()
  <dd>  Creates the peer of the canvas.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#paint(java.awt.Graphics)"><b>paint</b></a>(Graphics)
  <dd>  This method is called to repaint this canvas.
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="Canvas"></a>
<a name="Canvas()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Canvas</b>
<pre>
 public Canvas()
</pre>
<dl>
  <dd> Constructs a new Canvas.
<p>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="addNotify()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="addNotify"><b>addNotify</b></a>
<pre>
 public void addNotify()
</pre>
<dl>
  <dd> Creates the peer of the canvas.  This peer allows you to change the 
 user interface of the canvas without changing its functionality.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.awt.Component.html#addNotify()">addNotify</a> in class <a href="java.awt.Component.html#_top_">Component</a>
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.Toolkit.html#createCanvas(java.awt.Canvas)">createCanvas</a>, <a href="java.awt.Component.html#getToolkit()">getToolkit</a>
  </dl></dd>
</dl>
<a name="paint(java.awt.Graphics)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="paint"><b>paint</b></a>
<pre>
 public void paint(<a href="java.awt.Graphics.html#_top_">Graphics</a> g)
</pre>
<dl>
  <dd> This method is called to repaint this canvas. Most applications 
 that subclass <code>Canvas</code> should override this method in 
 order to perform some useful operation. 
 <p>
 The <code>paint</code> method provided by <code>Canvas</code> 
 redraws this canvas's rectangle in the background color. 
 <p>
 The graphics context's origin (0,&nbsp;0) is the top-left corner 
 of this canvas. Its clipping region is the area of the context.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> g - the graphics context.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.awt.Component.html#paint(java.awt.Graphics)">paint</a> in class <a href="java.awt.Component.html#_top_">Component</a>
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.Graphics.html#_top_">Graphics</a>
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.html">This Package</a>  <a href="java.awt.Button.html#_top_">Previous</a>  <a href="java.awt.CardLayout.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
