From 82d77936f4d011adf9a02fb6f37b3f60ed0db3fd Mon Sep 17 00:00:00 2001 From: Cole Landers Date: Wed, 4 Apr 2018 23:26:07 -0600 Subject: [PATCH] Style change to an element --- src/gameoflife/GameOfLife.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gameoflife/GameOfLife.java b/src/gameoflife/GameOfLife.java index 2da86f3..4b6cfe6 100644 --- a/src/gameoflife/GameOfLife.java +++ b/src/gameoflife/GameOfLife.java @@ -9,7 +9,7 @@ import javafx.scene.control.Button; import javafx.animation.AnimationTimer; public class GameOfLife extends Application{ - private static Cell[][] cells; + private Cell[][] cells; @Override public void start(Stage primaryStage) throws Exception { cells = new Cell[64][64]; @@ -45,16 +45,19 @@ public class GameOfLife extends Application{ Button stop = new Button("Stop"); stop.setOnAction(event->{ animate.stop(); - }); + }); + Button start = new Button("Start"); start.setOnAction(event->{ animate.start(); - }); + }); root.add(start, cells.length, cells[cells.length-1].length); root.add(stop, cells.length, cells[cells.length-1].length+1); + root.setStyle("-fx-background-color: white"); Scene scene = new Scene(root); + primaryStage.setTitle("Conway's Game of Life"); primaryStage.setScene(scene); primaryStage.show();