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.
-
MyCanvas()
-
-
paint(Graphics)
- Paint the canvas and notify the Panel container.
-
reshape(int, int, int, int)
- Notify the Panel container that the size of this canvas has changed.
-
resize(Dimension)
- Notify the Panel container that the size of this canvas has changed.
-
resize(int, int)
- Notify the Panel container that the size of this canvas has changed.
MyCanvas
public MyCanvas()
paint
public void paint(Graphics g)
- Paint the canvas and notify the Panel container.
- Overrides:
- paint in class Canvas
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
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
resize
public void resize(Dimension d)
- Notify the Panel container that the size of this canvas has changed.
- Overrides:
- resize in class Component