New window in Processing
问题 Yesterday I found the following code for creating a second window in Processing import javax.swing.JFrame; PFrame f; secondApplet s; void setup() { size(600, 340); } void draw() { background(255, 0, 0); fill(255); } void mousePressed(){ PFrame f = new PFrame(); } public class secondApplet extends PApplet { public void setup() { size(600, 900); noLoop(); } public void draw() { fill(0); ellipse(400, 60, 20, 20); } } public class PFrame extends JFrame { public PFrame() { setBounds(0, 0, 600, 340