Skip to content

Instantly share code, notes, and snippets.

@3846masa
Last active August 29, 2015 14:20
Show Gist options
  • Save 3846masa/b46a0eb51ee57354285e to your computer and use it in GitHub Desktop.
Save 3846masa/b46a0eb51ee57354285e to your computer and use it in GitHub Desktop.
Multi Window for Processing 3.0 b7 (UnLicense)
class SecondApplet extends PApplet {
PApplet parent;
SecondApplet(PApplet _parent) {
super();
// set parent
this.parent = _parent;
// init window
PSurface surface = super.initSurface(java.awt.Color.GRAY, -1, false, false);
surface.placeWindow(new int[]{0, 0});
}
void setup() {
this.size(300, 300);
}
void draw() {
background(frameCount % 255);
fill(0);
ellipse(width/2, height/2, width/2, height/2);
}
}
SecondApplet second;
void setup() {
size(400, 400);
second = new SecondApplet(this);
}
void draw() {
background(frameCount % 255);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment