You can check the actual instance of the JButton against the source simply using ==.

Or you could only add that ActionListener to that JButton, eliminating the need to check the source.