Advertisement
xtroyerall

Fundo

Oct 1st, 2014
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package genius;
  7.  
  8. import java.awt.*;
  9. import java.awt.image.*;
  10. import java.io.*;
  11. import javax.imageio.*;
  12. /**
  13.  *
  14.  * @author Gustavo
  15.  */
  16. public class FundoDoJogo {
  17.  
  18.     private BufferedImage vermelho;
  19.     private BufferedImage amarelo;
  20.     private BufferedImage verde;
  21.     private BufferedImage azul;
  22.  
  23.     public FundoDoJogo() throws IOException {
  24.         this.vermelho = ImageIO.read(new File("imagens/vermelho.gif"));
  25.         this.amarelo = ImageIO.read(new File("imagens/amarelo.jpg"));
  26.         this.verde = ImageIO.read(new File("imagens/verde.jpg"));
  27.         this.azul = ImageIO.read(new File("imagens/azul.jpg"));
  28.  
  29.     }
  30.  
  31.     public void desenha(Graphics2D g) {
  32.  
  33.         g.drawImage(amarelo, 50, 50, null);
  34.     }
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement