The Observer pattern
You may not realize it, but you will have encountered the observer pattern many times, as every click listener (and any other listener) is in fact an observer. The same applies to the icons and features of any desktop or GUI and these type of listener interfaces demonstrate very nicely the purpose of the observer pattern.
The observer acts like a sentry, keeping watch for a particular event or state change in its subject, or subjects, and then reporting this information to interested parties.
As already mentioned, Java has its own observer utilities, and although these can be useful in some cases, the way Java handles inheritance and the simplistic nature of the pattern makes writing our own preferable. We will see how to use these built-in classes but in most of the examples here, we will build our own. This will also provide a deeper understanding of the pattern's workings.
Notifications must be used with caution, as few things can annoy a user more than unwanted messages...