I go like this:
boolean GUI_COMPLETE = false;
exampleGUI gui = new exampleGUI();
@Override
public void onStart() {
gui.setVisible(true);
}
@Override
public int onLoop() throws InterruptedException {
if (GUI_COMPLETE) {
//normal script loop;
}
return 50; // The amount of time in milliseconds before the loop
// starts
// over
}
public class exampleGUI extends JFrame {
//gui code with an actionlistener on the start button which sets GUI_COMPLETE to true, and disposes the GUI.
}