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() {