Guest User

Untitled

a guest
Jul 22nd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. // You'll need these imports.
  2. import javax.imageio.*;
  3. import java.io.*;
  4.  
  5. // This goes in your constructor.
  6. try { img = ImageIO.read(new File("chris.png")); } catch (IOException e) {}
  7.  
  8. // This goes in your image(Graphics g) method.
  9. g.drawImage(img, xPos, yPos, null);
Add Comment
Please, Sign In to add comment