Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package genius;
- import java.awt.*;
- import java.awt.image.*;
- import java.io.*;
- import javax.imageio.*;
- /**
- *
- * @author Gustavo
- */
- public class FundoDoJogo {
- private BufferedImage vermelho;
- private BufferedImage amarelo;
- private BufferedImage verde;
- private BufferedImage azul;
- public FundoDoJogo() throws IOException {
- this.vermelho = ImageIO.read(new File("imagens/vermelho.gif"));
- this.amarelo = ImageIO.read(new File("imagens/amarelo.jpg"));
- this.verde = ImageIO.read(new File("imagens/verde.jpg"));
- this.azul = ImageIO.read(new File("imagens/azul.jpg"));
- }
- public void desenha(Graphics2D g) {
- g.drawImage(amarelo, 50, 50, null);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement