Class MyCanvas

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

public class MyCanvas
extends Canvas
A subclass of Canvas that adds callbacks when resize events happen.


Constructor Index

 o MyCanvas()

Method Index

 o paint(Graphics)
Paint the canvas and notify the Panel container.
 o reshape(int, int, int, int)
Notify the Panel container that the size of this canvas has changed.
 o resize(Dimension)
Notify the Panel container that the size of this canvas has changed.
 o resize(int, int)
Notify the Panel container that the size of this canvas has changed.

Constructors

 o MyCanvas
 public MyCanvas()

Methods

 o paint
 public void paint(Graphics g)
Paint the canvas and notify the Panel container.

Overrides:
paint in class Canvas
 o reshape
 public synchronized void reshape(int x,
                                  int y,
                                  int width,
                                  int height)
Notify the Panel container that the size of this canvas has changed.

Overrides:
reshape in class Component
 o resize
 public void resize(int width,
                    int height)
Notify the Panel container that the size of this canvas has changed.

Overrides:
resize in class Component
 o resize
 public void resize(Dimension d)
Notify the Panel container that the size of this canvas has changed.

Overrides:
resize in class Component