Description
As we did in the previous stage, we are going to make the application interactive. Just add two buttons: a JToggleButton which should toggle pause/resume, and a JButton which should start evolution all over again from the beginning.
After this, you will have an application that provides a comfortable experience of the Game of Life. Optionally you can add more features:
-
increasing/decreasing evolution speed (use buttons or JSlider)
-
color of cells (use JColorChooser or JComboBox)
-
setting the size of the new field (use JTextField or JDialog)
-
save/load (use JFileChooser)
-
and so on.
For testing reasons, you need to set the name of each component using the method component.setName(String name).
Name your labels with names GenerationLabel and AliveLabel.
Name your buttons with names PlayToggleButton and ResetButton.