invece di usare getActionCommand puoi usare getSource che ritorna un Object, casti a JButton e fai un setText