mirror of
https://github.com/brendanhaines/ProcessingSketches.git
synced 2024-11-09 21:14:50 -07:00
13 lines
341 B
Plaintext
13 lines
341 B
Plaintext
import javax.swing.*;
|
|
|
|
JFrame frame = new JFrame("Embedded PApplet");
|
|
frame.setResizable(true);
|
|
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
|
PApplet embed = new PApplet();
|
|
frame.add(embed);
|
|
embed.init();
|
|
while (embed.defaultSize&&!embed.finished)
|
|
try {Thread.sleep(5);} catch (Exception e) {}
|
|
frame.pack();
|
|
frame.setVisible(true);
|