Name
TextBox
Synopsis
TextBox
is a full-screen text editing component that has almost
the same programming interface as TextField
. Apart from the fact
that a TextBox
is visually represented as a multi-line control and
occupies the whole screen whereas TextField
usually appears as a
single line in a Form
, the only real difference between these two
controls is the fact that TextBox
does not notify content changes
to a listener. Application code should add a
Command
to the
TextBox
to allow the user to request that its content be processed.
public class TextBox extends Screen { // Public Constructors public TextBox(String title, String text, int maxSize, int constraints); // Public Instance Methods public void delete( int offset, int length); public int getCaretPosition(); public int getChars( char[] data); public int getConstraints(); public int getMaxSize(); public String getString(); public void insert( String src, int position); public void insert(char[] data, int offset, int length, int position); public void setChars(char[] data, int offset, int length); public void setConstraints( int constraints); public int setMaxSize( int maxSize); public void setString( String text); public int size(); }
Get J2ME in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.