summaryrefslogtreecommitdiff
path: root/src/StartScreen.java
blob: d0030c19772e37a2e1c653a9c596c210b3d45885 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

package src;

/**
 *
 * @author przem
 */
import java.awt.*;
import javax.swing.JPanel;
import java.awt.image.BufferedImage;
import java.io.IOException;
import javax.imageio.ImageIO;

public class StartScreen extends JPanel{
     private BufferedImage image;
    
    public StartScreen() {
        this.repaint();
        try {
            image = ImageIO.read(getClass().getResourceAsStream("/startscreen.jpg"));
        } catch (IOException ioe) {
            ioe.printStackTrace();
        }
    }
    protected void paintComponent(Graphics g){
        super.paintComponent(g);
 
        g.drawImage(image, 0,0,this);
    }
}