Java - Handle multiple events with one function?
问题 First of all, I am a complete Java NOOB. I want to handle multiple button presses with one function, and do certain things depending on which button was clicked. I am using Netbeans, and I added an event with a binding function. That function is sent an ActionEvent by default. How do I get the object that was clicked in order to trigger the binding function from within that function so I know which functionality to pursue? 回答1: The object that sent the event is the event source so evt