public class Canvas extends Component implements Accessible
The Canvas component is an empty rectangular area of ββthe screen onto which the application can draw or from which the application can capture input events from the user. An application needs to subclass the Canvas class to get useful features, such as creating a custom component. The drawing method must be redefined to execute custom graphics on the canvas.
Canvas for painting, basically. It also serves as a panel for creating a custom AWT-based component, but unlike Panel, it cannot contain other components.
source share