There is no secret button.
When you click on the X button of a G4P GWindow object one of three different things can happen:-
- the window will stay open
- the window can close (the sketch still runs, but without the window)
- the sketch can be shut down.
The default option is to keep the window open, but each window can have its own option. To change the option for a window use the setActionOnClose method.
To demonstrate this open the G4P_WindowsStarter sketch that comes with G4P find the createWindows method and after the for loop add the following code
- window[0].setActionOnClose(GWindow.KEEP_OPEN);
- window[1].setActionOnClose(GWindow.CLOSE_WINDOW);
- window[2].setActionOnClose(GWindow.EXIT_APP);
Now run the sketch - clicking on the X button in the blue window will cause it to stay open, in the green window it will cause it to close and in the red wind will stop the whole sketch.