Events

  • Sent by Operating System
  • Bind an Event to an Event Handler
  • When Event Happens, Call Event Handler

Events

  • Mouse Moved
  • Key Pressed
  • Key Released
  • Text Changed
  • Get Focus / Enter
  • Lose Focus / Leave
  • Resize

Java Swing

  • Implement a Listener Interface
  • Add Listener to Element
  • Program will call Listener on Event

Python tkinter

  • Bind Event to Callback Function
  • Program will call Callback Function

Event Handler

  • aka Listener, Callback
  • Function Called when Event Happens
  • Gets Data About Event
  • Can Update GUI, Perform Action
  • Long Operations Should Spawn Threads