Help please. I would like my JFrame to be automatically closed when it looses focus and is minimized. How could I accomplish that?
posted 13 years ago
you have to listen to the events "focusLost" (see the FocusListener) and "windowIconified (see WindowStateListener/WindowListener) implement these listeners and close the window when these events occur. don't you think the user might be astonished that the application just vanishes whenever it is deactivated (loses focus/is iconified)? Chantal