The Java Tutorials have been written for JDK 8. Examples and practices described in this page don't take advantage of improvements introduced in later releases.
The following sections give details about implementing specific kinds of event listeners. We do not have a how-to section for every single kind of event listener that you can write. Rather, we cover the listeners we think you are most likely to need. If you are interested in other listeners, you can find some information in the Listener API Table.