I have a main window that calls a `JDialog` and **have to wait** on this data!

can someone give me a tip on how to stop code execution until the main q given that the dialog gets?

waiting and grateful!

Edit
----

Managed to solve this: (for those who are going through the same choke that I spent ... sharing is never enough ! )

`JOptionPane` class blocks the application until the data is received ...

I made my `JDialog` received my `JOptionPane` containing the general `JPanel` (containing all that I want added to it)!

```
JOptionPane pane = new JOptionPane(panelGeral);  
   dialog = pane.createDialog(null, "Informe os dados solicitados:"); 

```