I have JDialog as the main window in my application (originally it was a JFrame, but it displayed in the taskbar, which I don't need).
I am currently doing:
setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
and when I press the exit button:
frame.dispose();
But the process still seems to be hanging in the background
JFrame had JFrame.EXIT_ON_CLOSEthat seemed to do what I wanted.
How can I close the application correctly?
source
share