import java.awt.TextField; public class TextFieldGUI extends PApplet implements ActionListener{ TextField myText = new TextField(); void setup(){ size(200,200); myText.setLocation(10,100); //this is an oddity of processing that you have to set these over again in the draw loop myText.setSize(100,20); myText.addActionListener(this); add(myText); } void draw(){ myText.setLocation(10,100); //this is an oddity of processing that you have to set these over again in the draw loop myText.setSize(100,20); } void actionPerformed(ActionEvent e) { println("You said: " + myText.getText()); myText.setText("You said: " + myText.getText()); } }