I try to get a processing PApplet to be initialized from Max. I can create the Applet but i can't get it to run. I can create a java Frame so my guess is that a PApplet should be possible.
Here is what i have know:
public class PAppletInMax extends MaxObject {
public static class Test {
Test() {
// this is to have a message in Max console
post("construct Test");
// create the Processing sketch
MaxTest_01 mt_01 = new MaxTest_01();
// call main
// here is where it goes wrong
//mt_01.main(new String[]{});
// this crashes max
//mt_01.runSketch(new String[]{}, mt_01);
//PApplet.runSketch(new String[]{}, mt_01);
}
}
public PAppletInMax() {
/*
// this works
JFrame frame = new JFrame("FrameDemo");
frame.pack();
frame.setVisible(true);
*/
Test t = new Test();
}
}
It would be really nice if someone could help. Cause once it works it's so much easier cause OSC won't be needed anymore for communication.