Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // You'll need these imports.
- import javax.imageio.*;
- import java.io.*;
- // This goes in your constructor.
- try { img = ImageIO.read(new File("chris.png")); } catch (IOException e) {}
- // This goes in your image(Graphics g) method.
- g.drawImage(img, xPos, yPos, null);
Add Comment
Please, Sign In to add comment