How do I keep a dialog box always on top?
I created a dialog box like this:
String response =
JOptionPane.s开发者_如何学JAVAhowInputDialog(null,"message","title",JOptionPane.PLAIN_MESSAGE);
I'd like to keep it always on top of all windows.
Do you have any idea?
Thanks!
In fact, using Java, having a system modal dialog is not possible. The best you can have is a toolkit modal option pane. That's to say an option pane that stay in front of all Java windows.
This example explains how Java6 allows you to do that.
Maybe I don't get the question, but I quickly created desktop app with code you posted and it actually is modal ...
精彩评论