Paul Clapham wrote:You might consider "new JDialog(null)" instead -- the documentation says that this is the only way to produce an "unowned" JDialog. It's possible that unowned JDialogs would act the way you want them to act, and then you wouldn't have to create the extra JFrame objects which you are now creating. Not that they are a big problem, but they are a solution which merits a comment to explain to future readers of the code why it was done.
"new JDialog()" and "new JDialog(null)" both are internally calling the overloaded constructor "new JDialog(null, false)" which means they have no difference, they do create "unowned" JDialogs but doesn't solve the original problem.