Java theory and practice: Be a good (event) listener.