//sketch_ControlP5_Textfield import controlP5.*; ControlP5 cp5; void setup() { size(400,400,P3D); noStroke(); PFont font = createFont("arial",20); cp5 = new ControlP5(this); cp5.addTextfield("input") .setPosition(0,0) .setSize(200,40) .setFont(font) .setFocus(true) .setColor(color(255,0,0)) .setValue("TEST") .setAutoClear(false) .setColorLabel(50) ; textFont(font); } void draw() { background(255); text(cp5.get(Textfield.class,"input").getText(), 0,130); pushMatrix(); lights(); fill(0,255,0); translate(width / 2, height / 2); rotateY(map(mouseX, 0, width, -PI/1, PI/1)); rotateX(map(mouseY, 0, height, PI/1, -PI/1)); box(50,50,100); popMatrix(); } public void input(String theText) { println("a textfield event for controller 'input' : " + theText); }