I know there are several questions about this, just i cant see the solution for my problem.
My problem is the same like this: How to stop Java from running the entire code with out waiting for Gui input from The user
The program does not wait for the >details to be entered it just initializes the Gui class and simply continues
Whit Netbeans IDE i create a gui for parsing arguments, that have manny text fields and one button.
The method of the button "Traducir" is:
private void jButtonTraducirActionPerformed(java.awt.event.ActionEvent evt) {
// I put the entries in attributes.
documento = this.pathDocumento.getText();
salida = this.pathSalida.getText();
ignoradas = this.pathIgnoradas.getText();
diccionarioDefecto = this.pathDiccionarioDefecto.getText();
diccionarioUser = this.pathDiccionarioUser.getText();
implementacion = this.pathImplementacion.getText();
reverseLocal = this.buttonReverse.isSelected();
// here I would have to do an notifyAll()
}
I have a class Main that call this:
menuPrincipal parsing = new menuPrincipal();
parsing.main(null);
// here I would have to do a whait()
For do whait() and notifyAll(), i have to put in a Synchronization context, but what synchronize? How do i do?