Program in a Program?

This thread demonstrates a way to start a new Processing sketch from an existing one: Closing a second window

Is this what you’re after?