I have written a Swing application which has a main window.
Now I would like to display a configuration dialog before the main window is shown because depending on the output of the configuration dialog, the main window might have to be created differently.
I have read somewhere that a dialog should always have a parent window, however.
What is the proper way to create and display the configuration dialog under these circumstances? Should I make it a JDialog or a regular JFrame?
Use null to reference the parent window. This is an OK practice when there is no parent.
Then you are free to do something like this
Edit: I have used JOptionPane as an example only, as pointed out by @Mre this could be extended to JDialog if more functionality is required.