I have a GUI class and another Event Handler class that implements the Listeners. In the GUI I have 2 buttons that listen to the controller class.
How do I make the keyPressed method of the management class identify which JButton is being pushed? Is that in the actionPerformed method I do it with getActionCommand and setActionCommand in each button of the GUI, but it only works with mouse clicks, however I do not know how it is with keyboard events.
Greetings.