From d629613db49ca4531ac4e5249ea380e0ddbb652c Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Wed, 26 Jan 2022 15:31:53 +0100 Subject: [PATCH] init startStack --- src/main/java/solitaer/SolitaerGamePanel.java | 2 ++ src/main/java/solitaer/StartStack.java | 34 ++++++++++++++++++ src/main/java/solitaer/images/back.png | Bin 0 -> 1361 bytes 3 files changed, 36 insertions(+) create mode 100644 src/main/java/solitaer/StartStack.java create mode 100644 src/main/java/solitaer/images/back.png diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 3fa1888..520ae04 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -15,6 +15,8 @@ public class SolitaerGamePanel extends JPanel { public SolitaerGamePanel() { setLayout(null); + StartStack a = new StartStack(25,25); + this.add(a); } diff --git a/src/main/java/solitaer/StartStack.java b/src/main/java/solitaer/StartStack.java new file mode 100644 index 0000000..79b3242 --- /dev/null +++ b/src/main/java/solitaer/StartStack.java @@ -0,0 +1,34 @@ +package solitaer; + +import java.awt.Graphics; +import java.awt.Image; +import java.util.ArrayList; + +import javax.swing.ImageIcon; +import javax.swing.JPanel; + +public class StartStack extends JPanel { + + private static final long serialVersionUID = 1L; + private Image im; + private ArrayList Stack = new ArrayList(); + + + + public StartStack(int _x, int _y) { + super.setLocation(_x, _y); + super.setSize(72,450); + super.setOpaque(false); + super.setLayout(null); + } + + @Override + protected void paintComponent(Graphics g) { + // TODO Auto-generated method stub + super.paintComponent(g); + ImageIcon ii = new ImageIcon(getClass().getResource("images/back.png")); + im = ii.getImage(); + g.drawImage(im, 0, 0, this.getWidth(), 96, this); + } + +} diff --git a/src/main/java/solitaer/images/back.png b/src/main/java/solitaer/images/back.png new file mode 100644 index 0000000000000000000000000000000000000000..9457b3025989f05a6724f9688f0e4b4007b5030b GIT binary patch literal 1361 zcmV-X1+MyuP)Px#1ZP1_K>z@;j|==^1poj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