I want to use methods in PApplet, but do not want to create a class extending PApplet.
Here is my code:
public class TestMain {
public static void main(String args[]){
PApplet pa = new PApplet();
pa.size(200,200);
}
}
An error happends for the line
pa.size(200,200) .
Exception in thread "main" java.lang.NullPointerException at processing.core.PApplet.size(Unknown Source) at processing.core.PApplet.size(Unknown Source)
I think it maybe because the initialization of PApplet is not correct, but I do not know to solve it.