TextBox is a text editor that takes up the whole main
pane, operating effectively in full screen mode. Contents are automatically
wrapped around from one row to the next.
A TextBox can have input constraints, such as PASSWORD,
which obscures the actual characters that are being typed.
A TextBox turns automatically active, when it becomes
the foreground Displayable or
when it resumes input focus. TextBox supports copy and
paste functionality.
Source code for the example
import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class ExampleTextbox extends MIDlet { Display display = Display.getDisplay(this); public void startApp() // TextBox(title, text, size, contrains) TextBox textbox = new TextBox("TextBox Example", "This is an example of a TextBox.\n" +"It has several lines of text.\n" +"\n" +"Lines that do not fit on the screen will be divided into two or more lines.", 255, 0); display.setCurrent(textbox); } public void pauseApp() { } public void destroyApp(boolean unconditional) { } }
For more information about S60-specific TextBox features,
see TextBox implementation
notes.