sclass PApplet2 extends PApplet { S title; void setTitle(S title) { this.title = title; ifndef Processing2 getSurface().setTitle(title); endifndef ifdef Processing2 setFrameTitle(frame, title); endifdef } void settings() {} void setup() { ifdef Processing2 settings(); endifdef } }