Action Events

Activating a Component, such as a Button, generally triggers the method

public boolean action(Event e, Object arg);
for that Component. The arg parameter depends on the Component that was activated. The following table summarizes the values:

Componentarg typedescription
ButtonStringThe label of the Button.
CheckboxBooleanThe new state of the checkbox.
ChoiceStringThe selected item.
ListStringThe selected item.
TextAreaStringThe text in the TextArea.
TextFieldStringThe text in the TextField.

Related Magercise(s):