diff options
author | Przemyslaw <prymula76@outlook.com> | 2024-04-01 09:02:22 +0200 |
---|---|---|
committer | Przemyslaw <prymula76@outlook.com> | 2024-04-01 09:02:22 +0200 |
commit | d8afc9f5c2aa97a96ca326c0178a7fc9577afaaf (patch) | |
tree | 730acbaff01acd5ebed98a7c6ee831ccb731706e /src/StartScreen.java |
Init
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); + } +} |