Hi Forum,
I have such a silly question, and I think it will be documented anywhere but I did not find anything. I have a JDialog class and I want that my application should wait to execute until this Dialog closes or set any variable to true. I think this is not so hard but I can't get along with that. Here Some Code
|
Code:
|
public class ConfigurationEditView extends javax.swing.JDialog{
...
...
...
public ConfigurationEditView(boolean first) {
super(new JFrame(), false);
initComponents();
}
public static void showDialog() {
Runnable view = new Runnable() {
public void run() {
ConfigurationEditView cfgView = new ConfigurationEditView(true);
cfgView.setVisible(true);
cfgView.toFront();
}
};
Thread nThread = new Thread(view);
nThread.start();
//SwingUtilities.invokeLater(view);
}
...
...
...
} |
And here the call
|
Code:
|
ConfigurationEditView.showDialog(); |
Can somebody give me a good example that my application (GUI App) not go on until the call
ConfigurationEditView.showDialog();
has returned.
I've tried with a boolean variable in a while loop but that also did'nt work.
Thx for suggestions