Hi All,
I need to design a UI for an application. I want to know if there is a J2ME equivalent to Combo Box? I need to port this app on most of the java enabled phones. Please help.
Thanks,
Shanker
Hi All,
I need to design a UI for an application. I want to know if there is a J2ME equivalent to Combo Box? I need to port this app on most of the java enabled phones. Please help.
Thanks,
Shanker
Use choice group check out an example
http://www.java-tips.org/java-me-tip...p-in-j2me.html
try this sample http://freesrc.com/?p=159
Hi,
Guys just adding to your posts -
Java docs says -All the three types of choicegroup -The ChoiceGroup is an MIDP UI widget enabling the user to choose between different elements in a Form. These elements consist of simple Strings, but can display an optional image per element as well. ChoiceGroups can be of two different types. Corresponding type constants are defined in the Choice interface. These constants are used in the List class as well; the List class allows an additional third type. The three type constants are listed in Table 3.4.
Table 3.4 Choice Type Constants
EXCLUSIVE
Specifies a ChoiceGroup or List having only one element selected at the same time.
IMPLICIT
Valid for Lists only. It lets the List send Commands to indicate state changes.
MULTIPLE
In contrast to EXPLICIT, MULTIPLE allows the selection of multiple elements.
http://java.poac.ac.cn/codeopen/jiao...hoiceGroup.htm
http://java.poac.ac.cn/codeopen/jiao...hoiceGroup.htm
http://java.poac.ac.cn/codeopen/jiao...WithImages.htm
Hope this is what you are looking for,
Thanks,
Thanks with Regards,
R a j - The K e r n e l
Join Delhi-NCR Nokia Developer's Community,
Thanx guys for that. I'm new to this stuff (j2me) and came across this thread. Been reading the documentation of ChoiceGroup and Choice and have checked the examples raj gave. Just wanted to ask if anyone has any examples of Choice.POPUP The 3 examples raj gave covers, multiple and exclusives and use of images. Pls is there any practical example (if possible with d mobile phone picture just like in those three examples so i really no what the output is like) of Choice.POPUP that anyone knows of? Thanx
Last edited by CSFYPMAIL; 2008-12-07 at 21:04.
Hi,
Just Go and read the code..
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class Choice_Group extends MIDlet
{
Display display=Display.getDisplay(this);
public void startApp()
{
Form form = new Form("Form example");
//ChoiceGroup(label,type,elements,image)
ChoiceGroup CoursePOP = new ChoiceGroup ("Pop Up choice", Choice.POPUP,
new String[] {"Python", "J2ME","Symbian"}, null);
form.append(CoursePOP);
display.setCurrent(form);
}
}
I hope that This will fulfill the need for the same,
Thanks,
Thanks with Regards,
R a j - The K e r n e l
Join Delhi-NCR Nokia Developer's Community,