Following code snippet will create a textbox and will display it on a form.
private Display display;
private Form form;
TextBox textBox = null;
...
public void startApp() {
display = Display.getDisplay(this);
form = new Form("My form");
textBox = new TextBox("Simple Example", "", 20, TextField.ANY);
form.append(textBox);
display.setCurrent(form);
}