Programmatic close of JFrame

Viewed 8792

What's the programmatic equivalent of clicking the close (x) button in the upper right corner of a JFrame?

There's the dispose() method but that's not the same thing, since a JFrame can be set to do several different things upon closing (not to mention if there's a WindowListener involved)

3 Answers
Related