From cf0ef3a2d27cbcaf5494cc7ac1d1c16f7d6afc22 Mon Sep 17 00:00:00 2001 From: Thoumi Ngonga Brice Date: Wed, 8 Feb 2023 16:12:20 +0100 Subject: [PATCH] Update Methode void BuildGui and class NewGameListener --- src/main/java/BattleShip/BShip.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/BattleShip/BShip.java b/src/main/java/BattleShip/BShip.java index 7542315..772e89d 100644 --- a/src/main/java/BattleShip/BShip.java +++ b/src/main/java/BattleShip/BShip.java @@ -11,6 +11,7 @@ public class BShip { JPanel thePanel = new JPanel(); JPanel textPanel = new JPanel(); JTextArea textArea = new JTextArea(); + JFrame theFrame = new JFrame("Battleship"); JMenuItem auto; JMenuItem[] boardSize = new JMenuItem[3]; public AIGridGUI grid2; @@ -66,6 +67,14 @@ public class BShip { textPanel.add(textArea); thePanel.add(textPanel); + thePanel.add(grid2); + + theFrame.add(thePanel); + theFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); + theFrame.setJMenuBar(bar); + theFrame.setBounds(0,0,500,750); + theFrame.setVisible(true); + } public class NewGameListener implements ActionListener {