You could try changing/adding a new Second constructor so that it takes in the reference to the First you want to be updated, and store this as a class variable. Then just use that instance inside the Second's actionPerformed.