In my history of writing Swing apps if I needed to spawn additional windows for whatever reason off my main JFrame I have just always used a JDialog. But none of them are modal. So I'm wondering if, aside from the modal part which I don't use, is there any advantage/disadvantage to using a JDialog instead of a JFrame for extra windows? Or am I just the same using a JFrame. Thanks.
The Frame can be maximum and minimum and dialog cannot, in office software, it cannot use multiple document interface, just open new frame for every file, in this case, you cannot use dialog. In other case, use dialog is preferred.
Hi Greg, I think it depends a bit on your users. My users are average office admin types. I have used JOptionPane but found that most of my users would eventually complain that my app froze. In about three cases where I was able to investigate, I found that they had somehow managed to hide the dialog box behind the main app which then appeared dead. I could get to the dialog box with alt tab but this is not something I could expect the users to do. I have not been able to duplicate this behaviour for myself but I am now rather more reluctant to use modal screens. My app (about 10 screens) is now arranged as a tabbed pane and that has been pretty successful.
The nice thing about Standards is that there are so many to choose from!
The main reason I use them is for their automatic blocking As I said, none of mine are going to be modal so I don't have to worry about that issue. I have used JOptionPane but found that most of my users would eventually complain that my app froze Did I say something about a JOptionPane in my question? BTW - The reason your users are having that problem is because you aren't specifying the parent frame for the JOptionPane to be modal to. If you specify the parent frame the JOptionPane cannot get lost behind it. The Frame can be maximum and minimum and dialog cannot, This seems the only valid reason so far however, I can disable window decorations on my JFrame and then the user won't be able to minimize/maximize. So does anyone else have any viable reasons?