|
How to add String to a form |
|
|
A J2ME tip illustrating a method of adding strings to a form. The
first four append( ) calls add text strings to the Form. The top line
of the screen holds the two separate items "Hello" and "World", which
will be laid out horizontally because they are string items. The next
item to be added begins and ends with newline characters.
Form form = new Form("Item Layout");
form.append("Hello");
form.append("World");
form.append("\nLet's start\na new line\n");
form.append("This is quite a long string that may not fit on one line");
form.append(new TextField("Name", "J. Doe", 32, TextField.ANY));
form.append("Address");
form.append(new TextField(null, null, 32, TextField.ANY));
|
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.