As George said, PAppletno longer expands Appletcompared to treatment 3.
, , runSketch() :
public class MyPapplet extends PApplet {
public static void main(String... args){
String[] pArgs = {"MyPapplet "};
MyPapplet mp = new MyPapplet ();
PApplet.runSketch(pArgs, mp);
}
public void settings() {
size(200, 100);
}
public void draw() {
background(255);
fill(0);
ellipse(100, 50, 10, 10);
}
}
, , , . :
PSurfaceAWT awtSurface = (PSurfaceAWT)mp.surface;
PSurfaceAWT.SmoothCanvas smoothCanvas = (PSurfaceAWT.SmoothCanvas)awtSurface.getNative();
, .