Example usage for java.awt Graphics drawImage

List of usage examples for java.awt Graphics drawImage

Introduction

In this page you can find the example usage for java.awt Graphics drawImage.

Prototype

public abstract boolean drawImage(Image img, int x, int y, ImageObserver observer);

Source Link

Document

Draws as much of the specified image as is currently available.

Usage

From source file:MainClass.java

public void paint(Graphics g) {
    g.drawImage(image, getSize().width / 2 - 50, 5, this);
}

From source file:ImageView.java

public void paint(Graphics g) {
    g.drawImage(im, 0, 0, this);
}

From source file:Main.java

@Override
public void paintComponent(Graphics g) {
    super.paintComponent(g);
    g.drawImage(scaled, 0, 0, null);
}

From source file:Main.java

@Override
public void paintComponent(Graphics g) {
    super.paintComponent(g);
    if (image != null) {
        g.drawImage(image, 0, 0, this);
    }//from   www .j  a va2  s.com
}

From source file:FilterLab.java

public void paint(Graphics g) {
    g.drawImage(originalImage, 10, 50, this);
    g.drawImage(filteredImage, 271, 50, this);

}

From source file:MainClass.java

public void paint(Graphics g) {
    BufferedImage clone = emboss(createImage());

    g.drawImage(clone, 20, 20, this);
}

From source file:MainClass.java

public void paint(Graphics g) {
    g.drawImage(j, 10, 10, this);
}

From source file:MainClass.java

public void paint(Graphics g) {
    g.drawImage(i, 10, 10, this); // regular
    if (j != null)
        g.drawImage(j, 150, 10, this); // rowFlip
    if (k != null)
        g.drawImage(k, 10, 60, this); // colFlip
    if (l != null)
        g.drawImage(l, 150, 60, this); // rot90
}

From source file:HighlightedButton.java

@Override
protected void paintComponent(Graphics g) {
    super.paintComponent(g);
    g.drawImage(highlight, getWidth() / 4, getHeight() / 4, null);
}

From source file:RotateImage45Degrees.java

public void paint(Graphics g) {
    if (destinationBI != null)
        g.drawImage(destinationBI, frameInsets.left, frameInsets.top, this);
}