From fa8af110fbea120fbe41a4a1f1468b47c88df800 Mon Sep 17 00:00:00 2001 From: fdai4581 Date: Tue, 7 Feb 2023 22:26:10 +0100 Subject: [PATCH] update --- src/main/java/BattleShip/GridGUI.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/BattleShip/GridGUI.java b/src/main/java/BattleShip/GridGUI.java index f4bc7ff..76f4037 100644 --- a/src/main/java/BattleShip/GridGUI.java +++ b/src/main/java/BattleShip/GridGUI.java @@ -97,7 +97,13 @@ public class GridGUI extends JPanel { } } } + for(int i = 0; i < shipLength; i++) { + buttons.get(testLocations[i]).setCellContents(s); + } + + testLocations = null; } + } public boolean getClicked() {return clicked;} public void setClicked() {