I just upgraded to Processing 3.1.1 and updated the ControlP5 library, and my code that was working earlier on P3 is now throwing an error I can't trace. The error is: The method add(Component) in the type Container is not applicable for the arguements (MyApp.ControlFrame)
Error is thrown on f.add(p); below
ControlFrame addControlFrame(String theName, int theWidth, int theHeight) {
PImage icon = loadImage("MY_LOGO.png");
frame.setIconImage(icon.getImage()); // ========== SET WINDOW ICON
Frame f = new Frame(theName);
ControlFrame p = new ControlFrame(this, theWidth, theHeight);
f.add(p);
p.init();
f.setTitle(theName);
f.setSize(p.w, p.h);
f.setLocation(displayWidth - 250, 30);
f.setResizable(true);
f.setVisible(true);
f.setAlwaysOnTop( true );
f.setIconImage(icon.getImage()); // ========== SET WINDOW ICON
return p;
}
Has something changed in the latest release of Processing to cause this, or am I missing something else? Any suggestions and/or insights are very much welcome.