public void actionPerformed(ActionEvent e) {
if(e.getSource()==button) {
button.setText("Button Clicked!");
}}
A semantic event which indicates that a component-defined action
occurred. This high-level event is generated by a component
(such as a Button) when the component-specific action occurs
(such as being pressed). The event is passed to every ActionListener
object that registered to receive such events using the component's
addActionListener method.