Graphical representation of game of life in Java using swing