Example usage for Java java.awt Canvas fields, constructors, methods, implement or subclass
The text is from its open source code.
Canvas() Constructs a new Canvas. |
void | addMouseListener(MouseListener l) Adds the specified mouse listener to receive mouse events from this component. |
Rectangle | getBounds() Gets the bounds of this component in the form of a Rectangle object. |
Graphics | getGraphics() Creates a graphics context for this component. |
T[] | getListeners(Class Returns an array of all the objects currently registered as FooListener s upon this Component . |
void | removeMouseListener(MouseListener l) Removes the specified mouse listener so that it no longer receives mouse events from this component. |
void | removeMouseMotionListener(MouseMotionListener l) Removes the specified mouse motion listener so that it no longer receives mouse motion events from this component. |
void | setBackground(Color c) Sets the background color of this component. |
void | setSize(Dimension d) Resizes this component so that it has width d.width and height d.height . |
void | setSize(int width, int height) Resizes this component so that it has width width and height height . |