Hi everybody,
i'm trying to use Processing in an existing RCP application but i'm having no luck initiating the PApplet.
There is following Exception thrown:
java.lang.RuntimeException: You need to use "Import Library" to add processing.core.PGraphicsJava2D to your sketch.
at processing.core.PApplet.makeGraphics(PApplet.java:1192)
at processing.core.PApplet.init(PApplet.java:594)
I tried including the core.jar bundled as a RCP-Plugin instead of including it on the classpath, but that didn't helped at all.
I called my custom PApplet as following, which is working in a standalone swt-application:
Code:
Composite composite = new Composite(parent, SWT.EMBEDDED | SWT.NO_BACKGROUND);
composite.setLayoutData(gd);
composite.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_BLACK));
Frame frame = SWT_AWT.new_Frame(composite);
MyPApplet pap = new MyPApplet();
frame.add(pap);
pap.init();
Here is the MyPApplet class:
Code:
import processing.core.PApplet;
public class MyPApplet extends PApplet {
int x =230;
int y =185;
public void setup(){
size(300,300);
}
}
It would be grate if anybody has any suggestions