Not related to the web but this is the only programming forum so....here it is. My problem is simple. Java related, of course. I have a window (which herits from JFrame), and I'd like to output a message when the user clicks on the X at the top-right corner of the window, but I don't know how to handle that event. I'm guessing a method is called when that happens but it's only a guess. I've done it once before but really can't remember how it's done. Any help is appreciated.