Reputation: 5084
Hi i have something like this
JOptionPane.showMessageDialog(null, Config.CHECK_INTERNET_CONNECTION);
System.out.println("go");
// HERE I CHECK MY INTERNET CONNECTION
aftter Dialog window popup application has to wait with printing go
till i press OK button, is there chance to skip it? So that sign go
will print after window popup?
Upvotes: 1
Views: 457
Reputation: 64640
No, that's the very nature of an option pane, to halt the execution until got an answer from the user.
Upvotes: 2
Reputation: 63708
You have to use modeless
JDialog
. See The New Modality API in Java SE 6.
Upvotes: 2