Hello community of Stackoverflow, my doubt is the following one I will see I am registering a sale for it I need the data of the client (this in a window). I consult in my database if the client is registered or not, if it is not registered I show a window with the registration option, to register the client. The issue is that all the method I had in the first window is still running.
What I want is that if I go to the registration window, the execution flow (to call it somehow) goes to that window and then returns to the main window (of the sale).
FRAME CODE:
clientevo ocliente =null; for (int i = 0; i < mdlclientes.lclientes.size(); i++) {
if (mdlclientes.lclientes.get(i).getNombre().toUpperCase().equals(cliente.toUpperCase())) {
ocliente=new clientevo();
ocliente = mdlclientes.lclientes.get(i);
}
}
if (ocliente==null) {
JOptionPane.showMessageDialog(null, "register the client");
frmclienteregistro ofrmcliente=new frmclienteregistro();
ofrmcliente.setVisible(true);
ocliente=new clientevo();
ocliente=ofrmcliente.crearcliente();
}
return ocliente;