Button with an Action Listener

Who knows how to add an action listener to a normal button?An example code with a button, that changes its name, when clicked on it, would be great.
[162 byte] By [EricFalbea] at [2007-11-27 8:02:22]
# 1
http://www.google.com/search?q=java+actionlistener
hunter9000a at 2007-7-12 19:44:33 > top of Java-index,Java Essentials,Java Programming...
# 2
Have a look at the tutorial: http://java.sun.com/docs/books/tutorial/uiswing/components/button.html-Puce
Pucea at 2007-7-12 19:44:33 > top of Java-index,Java Essentials,Java Programming...
# 3
The Tutorial is about JButtons.Is there any example code for simply Buttons?Or maybe an old tutorial?
EricFalbea at 2007-7-12 19:44:33 > top of Java-index,Java Essentials,Java Programming...
# 4
They work the same way for Buttons as for JButtons. Any particular reason you're using awt instead of swing?
hunter9000a at 2007-7-12 19:44:33 > top of Java-index,Java Essentials,Java Programming...
# 5
Are you using AWT? Though I recommend to use Swing instead of AWT if possible: the way to add an action listener to a button is the same for Swing and AWT (Swing is build on AWT!)-PuceMessage was edited by: PuceToo slow ;-)
Pucea at 2007-7-12 19:44:33 > top of Java-index,Java Essentials,Java Programming...
# 6
implement the actionlistener.. add a button, add a listener to it, create an actionperformed method and add the statements you want,..
deAppela at 2007-7-12 19:44:33 > top of Java-index,Java Essentials,Java Programming...
# 7
Oh oh oh ... I do I do I do ... *jumps up and down maniacally*<goaltender in a whimsical mood scary concept>PS.
puckstopper31a at 2007-7-12 19:44:33 > top of Java-index,Java Essentials,Java Programming...