View RSS Feed

Java AWT

Java Abstract Window Toolkit (AWT)

  1. Drawing an Image

    by , 03-07-2012 at 06:00 PM
    Graphics.drawImage method is used to draw the images at a specific location:
    Java Code:
    boolean Graphics.drawImage(Image img,
                               int x, int y,
                               ImageObserver observer);
    Top left position of an image is specified by x,y location. Observer parameters are usually null as they are not used frequently or directly & is also not required for BufferedImage.

    This method is used just when there is a need ...