posted 21 years ago
Hi,
I am trying to determine the type of the object that generates an action event. In my case, my JMenuItem an JButton register with the same event listener. In actionPerformed method, i need to tell which object generates the event. ActionEvent.getSource() method gives me the object. How can i tell which class(JMenuItem,JButton) they belong to?
Thanks.