Problems with PApplet

edited February 2017 in Kinect

Hi guys

Apologies if my terminology is in any way incorrect but my processing skills are a bit rusty. I've been trying to get on open source toolkit for Kinect (found here: to work. This was built for Processing(2.x), however, finding libraries like simpleOpenNI which are compatible has been a bit of a challenge. I've resolved to trying to update the code for Processing(3.x) and for the most part everything seems to be working fine.

I did however come across some documentation on the newest version of Processing which states that Applets won't function in the same way anymore, which is where my problem seems to lie. The code is as follows:

public class ChessboardFrame extends JFrame { public ChessboardFrame() { setBounds(displayWidth,0,pWidth,pHeight); ca = new ChessboardApplet(); add(ca); removeNotify(); setUndecorated(true); setAlwaysOnTop(false); setResizable(false);
ca.init(); setVisible(true); } }

public class ChessboardApplet extends PApplet { public void setup() { noLoop(); } public void draw() { } }

void saveCalibration(String filename) { String[] coeffs = getCalibrationString(); saveStrings(dataPath(filename), coeffs); }

void loadCalibration(String filename) { String[] s = loadStrings(dataPath(filename)); x = new Jama.Matrix(11, 1); for (int i=0; i<s.length; i++) x.set(i, 0, Float.parseFloat(s[i])); calibrated = true; println("done loading"); }

When I try to run it, I get 2 errors saying, ' The function "add()" expects parameters like: "add(Component)" ' and ' The function "init()" does not exist ' referring to lines 5 and 11.

Anyone got any advice as to what I should do to solve the problem?



  • Format your code. Press the gear icon to edit your post, then select your code and press ctrl+o. Leave a line above and below your code.


Sign In or Register to comment.