Java java.awt Canvas fields, constructors, methods, implement or subclass

Example usage for Java java.awt Canvas fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.awt Canvas.

The text is from its open source code.

Subclass

java.awt.Canvas has subclasses.
Click this link to see all its subclasses.

Constructor

Canvas()
Constructs a new Canvas.

Method

voidaddMouseListener(MouseListener l)
Adds the specified mouse listener to receive mouse events from this component.
RectanglegetBounds()
Gets the bounds of this component in the form of a Rectangle object.
GraphicsgetGraphics()
Creates a graphics context for this component.
T[]getListeners(Class listenerType)
Returns an array of all the objects currently registered as FooListeners upon this Component .
voidremoveMouseListener(MouseListener l)
Removes the specified mouse listener so that it no longer receives mouse events from this component.
voidremoveMouseMotionListener(MouseMotionListener l)
Removes the specified mouse motion listener so that it no longer receives mouse motion events from this component.
voidsetBackground(Color c)
Sets the background color of this component.
voidsetSize(Dimension d)
Resizes this component so that it has width d.width and height d.height .
voidsetSize(int width, int height)
Resizes this component so that it has width width and height height .