Drawing an Image - Java 2D Graphics

Java examples for 2D Graphics:BufferedImage Paint

Description

Drawing an Image

public void paint(Graphics g) {
    // Draw an Image object
    int x = 0;
    int y = 0;
    g.drawImage(image, x, y, this);

    // Draw an Icon object
    x = 0;
    y = 100;
    icon.paintIcon(this, g, x, y);
}

Related Tutorials