distinguishing between Buttons

I am implementing ActionListener. I make two Buttons and add them to the listener. The code to run when a Button is pressed is inpublicvoid actionPerformed (ActionEvent Pressed)

the buttons should do two different things, so how do I tell which button was pressed?

[345 byte] By [bean903a] at [2007-10-2 20:15:48]
# 1
Your ActionEvent object - Pressed - will have an inherited getSource() method.Check the java.awt.event package.
ValentineSmitha at 2007-7-13 22:58:08 > top of Java-index,Java Essentials,Java Programming...
# 2
thank you
bean903a at 2007-7-13 22:58:08 > top of Java-index,Java Essentials,Java Programming...