Button
Basic “push to activate” GUI component.
It gets constructed with a text label (a String) :
- Button b = new Button(“Press-me”);
- b.addActionListener(theActionListener)
- add(b)
Event handling :
- theActionListener->actionPerformed(ActionEvent ae)
- (Button)ae.getSource().getActionCommand() -> Label