I'm having trouble with getting user input for a game of life assignment. I am using a 2d array to calculate cell generations and calling a separate class with nested loops to generate graphics components, which are then added to a container with a grid layout. This all works fine. We are then supposed to be able to update the cells when the user clicks on them. I don't know how to do this. If I use a variable generated within the graphics component class, how do I pass this data to the main class? I'm thinking there is something simple that I'm missing.