When you're reading API documentation (if you're reading it) you should also
read the documentation for the parent class etc. So for a JFrame you should
also check the API documentation for the Frame and Window classes. You
definititely will see a WindowListener mentioned. Read about it.
Comment