previous |
start |
next
User Interface Actions
- Add action code into actionPerformed method
- Gloss over routine code
helloButton.addActionListener(new
ActionListener()
{
public void actionPerformed(ActionEvent event)
{
textField.setText("Hello, World");
}
});
- When button is clicked, text field is set
previous |
start |
next