0
|
1
|
|
2 package src;
|
|
3
|
|
4 /**
|
|
5 *
|
|
6 * @author przem
|
|
7 */
|
|
8 import java.awt.*;
|
|
9 import javax.swing.JPanel;
|
|
10 import java.awt.image.BufferedImage;
|
|
11 import java.io.IOException;
|
|
12 import javax.imageio.ImageIO;
|
|
13
|
|
14 public class StartScreen extends JPanel{
|
|
15 private BufferedImage image;
|
|
16
|
|
17 public StartScreen() {
|
|
18 this.repaint();
|
|
19 try {
|
|
20 image = ImageIO.read(getClass().getResourceAsStream("/startscreen.jpg"));
|
|
21 } catch (IOException ioe) {
|
|
22 ioe.printStackTrace();
|
|
23 }
|
|
24 }
|
|
25 protected void paintComponent(Graphics g){
|
|
26 super.paintComponent(g);
|
|
27
|
|
28 g.drawImage(image, 0,0,this);
|
|
29 }
|
|
30 }
|