Over the next several lectures we discussed the use of interfaces to decouple components of our software. In particular, we saw an example of how event handling is done in the Java library classes. In particular, we looked at the JButton class and the ActionListener interface:

There is example code in the lecture code repository, under the "EventHandling" project.