I have 3 classes called on a button action perfomed. After one class is called a new jframe appears and a user must complete some dates. I would like that the second and third class to be called after the user close the second jFrame. The question (and i appreciate any suggestions) is how can i implement an action in the first frame that 'knows' when the other frame is closed?
 insertUser insertUserX=new insertUser(name,user,pass);
 new AddDates(xText1,xText2,xText3,xText4).setVisible(true);
    //here the second jFrame appears and i wouldd like to stop the executin until the frame is closed
 checkData xCheckData = new checkData(); 
 update xUpdate = new update(name, user, pass);
 
    