making the program wait
Hi There I have written a program that consists of a main GUI and another frame for entering details: I want the class with the main GUI in it to wait until the details in the other frame have been entered, but I dont know how to do this. I have tried Thread.wait() but this doesnt work as they seem to be in the same thread. I have been advised to use a modal dialog box but am not sure how to do this. My code is as follows:
publicvoid processStart()
{
if(startF!=null)
{
;// do nothing
}
else
{
p1 =new Player(this);
p2 =new Player(this);
startF =new StartFrame(p1, p2,this);
startF.setTitle("player information");
startF.setSize(450, 300);
startF.show();
this.repaint();
this.getContentPane().invalidate();
this.getContentPane().validate();
// the program should wait here until details are entered in the start frame before continuing with the code
if(startF.isSubmitted())
{
System.out.println("is submitted");
startF=null;
p1.moveChoose(this);
p2.moveChoose(this);
}
}
}
Any help would be most appreciated

