When I offer a prompt to close a window (JFrame), and the user chooses No or Cancel, I am using the following:
setVisible(false);
dispose();
but the window disappears, and a blank square overlays the main window and buttons.
I don't want that
Do you have any ideas to solve this?