From f01ffd03a92df7ff62df0d78a01b04a98cd41bc7 Mon Sep 17 00:00:00 2001 From: Yazan Alaamer Date: Fri, 20 Jan 2023 20:25:13 +0100 Subject: [PATCH] create choices buttons --- src/main/java/game/StartDarkSoulsGame.java | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/main/java/game/StartDarkSoulsGame.java b/src/main/java/game/StartDarkSoulsGame.java index 40ac1ea..d2ea974 100644 --- a/src/main/java/game/StartDarkSoulsGame.java +++ b/src/main/java/game/StartDarkSoulsGame.java @@ -22,6 +22,7 @@ public class StartDarkSoulsGame { Font titelFont = new Font("Times new Roman", Font.PLAIN, 90); Font normalFont = new Font ("Times new Roman", Font.PLAIN, 28); JButton startButton; + JButton StartButton, choice1, choice2, choice3, choice4; Container con; TitelScreenHandler tsHandler= new TitelScreenHandler(); @@ -78,6 +79,30 @@ public class StartDarkSoulsGame { choiceButtonPanel.setBackground(Color.blue); choiceButtonPanel.setLayout(new GridLayout(4,1)); con.add(choiceButtonPanel); + + choice1 = new JButton("Choice 1"); + choice1.setBackground(Color.black); + choice1.setForeground(Color.white); + choice1.setFont(normalFont); + choiceButtonPanel.add(choice1); + + choice2 = new JButton("Choice 2"); + choice2.setBackground(Color.black); + choice2.setForeground(Color.white); + choice2.setFont(normalFont); + choiceButtonPanel.add(choice2); + + choice3 = new JButton("Choice 3"); + choice3.setBackground(Color.black); + choice3.setForeground(Color.white); + choice3.setFont(normalFont); + choiceButtonPanel.add(choice3); + + choice4 = new JButton("Choice 4"); + choice4.setBackground(Color.black); + choice4.setForeground(Color.white); + choice4.setFont(normalFont); + choiceButtonPanel.add(choice4); } public class TitelScreenHandler implements ActionListener{ public void actionPerformed(ActionEvent event) {