Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.awt

Class Canvas

java.lang.Object
|
+--java.awt.Component
   |
   +--java.awt.Canvas

All Implemented Interfaces:

Serializable, ImageObserver, MenuContainer, Serializable


public class Canvas

extends Component

implements Serializable

Constructor Summary

Canvas()

Initializes a new instance of Canvas.
Canvas(java.awt.GraphicsConfiguration graphicsConfiguration)

Method Summary

voidaddNotify()

Creates the native peer for this object.
voidpaint(java.awt.Graphics gfx)

Repaints the canvas window.

Constructor Details

Canvas

public Canvas()

Initializes a new instance of Canvas.


Canvas

public Canvas(java.awt.GraphicsConfiguration graphicsConfiguration)

Parameters:


Method Details

addNotify

public void addNotify()

Creates the native peer for this object.


paint

public void paint(java.awt.Graphics gfx)

Repaints the canvas window. This method should be overriden by a subclass to do something useful, as this method simply paints the window with the background color.

Parameters: