We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I am a little lost trying to update a PS2 sketch where I was using Frame class. Google is a little confuse about giving me results when I type Psurface or surface or processing all together.
it was actually an example from internet to make a floating windows for controllers, which now is not working.
ControlFrame addControlFrame(String theName, int theWidth, int theHeight) {
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(100, 100);
f.setResizable(false);
f.setVisible(true);
return p;
}
public class ControlFrame extends PApplet {
public void setup() {
size(w, h, P3D);
frameRate(25);
}//...
}
Thanks
Answers
https://forum.Processing.org/two/discussions/tagged?Tag=PApplet.runSketch()
GoToLoop, thank you.
I have actually figured it out with runSketch(). I was curious about the use of surface, since I have seen some examples using surface methods (surface.setResizable(true), surface.setSize(w,h)) and I would like to read more about it.
Thank you anyway!
Variable frame still exists in P3. Although it's
@Deprecated
w/ limited available methods. :-&Thanks!! I will investigate it.
I dont know what I was doing wrong the other day, but now I found something about PSurface methods I was looking for the other day!
http://processing.github.io/processing-javadocs/core/processing/core/PSurface.html