Saving partial display for showing and hiding

I have a main window and 6 extra windows which are opened from the main window via a menu.
I can save and restore a partial view in the main window.
How can I do the same with the extra windows?

I have established 6 PApplets such as;

</>
PWindow win;
PTermoeleman Termo;
PPsikrometrik Deney6;
PKalorimetre Kalori;
PDyno Dinamometre;
PElectric Elektrik;
</>
as an example
</>
class PWindow extends PApplet
{
PWindow()
{
super();
PApplet.runSketch(new String {this.getClass().getSimpleName()}, this);
}
</>

I can open this window within a switch list;

</>
switch(ExpNo)
-
-
case 5:
{
win = new PWindow();
break;
}
-
-
</>

I have drawn a graph area using shapes (2 rectangles, etc)
I am drawing line from data obtained through serial port.
I want to be able to hide the graph by storing the outer rectangle area to an image prior to and after drawing the graph.
Below is link to my program folder
[sketch_New - Google Drive]