Class ImageCanvas

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

public class ImageCanvas
extends Canvas

Constructor Index

 o ImageCanvas(Image)
Constructs component with given image on its background.

Method Index

 o getMinimumSize()
Gets the mininimum size of this component.
 o getPreferredSize()
Gets the preferred size of this component.
 o paint(Graphics)
This method is called to draw this component.
 o update(Graphics)
Updates this component.

Constructors

 o ImageCanvas
 public ImageCanvas(Image image)
Constructs component with given image on its background.

Parameters:
image - image to show.

Methods

 o paint
 public void paint(Graphics g)
This method is called to draw this component. Draws image over the canvas.

Parameters:
g - the graphics context.
Overrides:
paint in class Canvas
See Also:
Graphics
 o update
 public void update(Graphics g)
Updates this component.

Parameters:
g - the specified context to use for updating.
Overrides:
update in class Component
 o getMinimumSize
 public Dimension getMinimumSize()
Gets the mininimum size of this component.

Returns:
A dimension object indicating this component's minimum size.
Overrides:
getMinimumSize in class Component
 o getPreferredSize
 public Dimension getPreferredSize()
Gets the preferred size of this component.

Returns:
A dimension object indicating this component's preferred size.
Overrides:
getPreferredSize in class Component