Class ImageCanvas

    • Constructor Detail

      • ImageCanvas

        public ImageCanvas()
        Creates a new instance of ImageCanvas.
    • Method Detail

      • setImage

        public void setImage​(Image img)
        Sets the Image to be displayed on the canvas.
        Parameters:
        img - the Image to be displayed
      • paint

        public void paint​(Graphics g)
        Paints its Image (if specified) in the upper-left hand corner of itself.
        Overrides:
        paint in class Canvas
        Parameters:
        g - the Graphics object on which to paint.