Events (1)
Tcl scripts can be bound to Java events
java::bind $button \ actionPerformed \ "toggleButton $button"
When pressed, the button:
- Creates an ActionEvent object
- Scans a list of attached ActionListeners
- Calls the actionPerformed method of each listener