What is the difference between a JFrame and a JDialog?
Why can\'t we use setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE); for a JD
Why we can't use
setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);forJDialog?
Sure you can.
Post your SSCCE that demonstrates the problem you are having when using this value.
However you can't use EXIT_ON_CLOSE for a JDialog because that value is not supported which makes sense since a JDialog is a "child" or "helper" window for your application which is represented by a JFrame. Closing a dialog should not close the application.