File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java Micro Edition and the fly likes List and Textfield on same form? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "List and Textfield on same form?" Watch "List and Textfield on same form?" New topic

List and Textfield on same form?

Todd Plambeck

Joined: Jan 27, 2005
Posts: 10
I'm a J2ME newbie looking for advice. I'm trying to create a form on a MIDP 1.0 phone that requires a textfield and a list. The user will type some text into the textfield and then click a command button. The value is stored in RMS and added to a list on the screen below the textfield. Later the user will come back to this screen and the stored list will be displayed. Then each time the user types in one of the values off the list, the item is removed from RMS and removed from the list on the screen. Think of it as adding and removing items from an inventory. I could just append text to the screen, but removing them later is beyond me. Thanks in advance. Todd
Yuri Magrisso
Ranch Hand

Joined: Sep 13, 2003
Posts: 58
The only way I know is to use another GUI toolkit, because in MIDP 1.0 you cannot put a List on a Form. You can try the Nextel Open Windowing Toolkit. Have in mind that the toolkit will add significantly to your code size.

You could also simulate a list using StringItem components, but I haven't tried this myself and I am not sure whether it will really work.

Some Motorola phones come with an additional GUI library, LWT, which is very similar to Nextel's OWT.

I agree. Here's the link:
subject: List and Textfield on same form?
It's not a secret anymore!