diff options
Diffstat (limited to 'src/StartScreen.java')
-rw-r--r-- | src/StartScreen.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/StartScreen.java b/src/StartScreen.java new file mode 100644 index 0000000..d0030c1 --- /dev/null +++ b/src/StartScreen.java @@ -0,0 +1,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); + } +} |