Hello,
i want a MIDlet to take input using forms. if someone please guide me through the process. And pleaes provide code snnipet to do that. Thanks in advance
Hello,
i want a MIDlet to take input using forms. if someone please guide me through the process. And pleaes provide code snnipet to do that. Thanks in advance
Assuming that you want to take textual input and also that you already know how to display the J2ME form; use append method of form to add TextField in it. You can add as many as per your requirement. When you will display such form - user can enter text in the text field. Also, add a Command to the form so that when user is doen he can press the command. The form will implement CommandListener and hence will have a method commandAction. In commandAction you can take strings that use has entered using TextField method getString().
You can also take input from user using other components (such as Checkboxes, Radio buttons and drop down list)at the place of TextField.
For code snippet - see the code of sample application UIDemo supplied with WTK.