×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    May 2008
    Location
    India
    Posts
    172

    Question Combo Box - J2ME

    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

  2. #2
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    166

    Re: Combo Box - J2ME

    Use choice group check out an example

    http://www.java-tips.org/java-me-tip...p-in-j2me.html

  3. #3
    Registered User
    Join Date
    Nov 2008
    Posts
    4

    Re: Combo Box - J2ME

    try this sample http://freesrc.com/?p=159

  4. #4
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: Combo Box - J2ME

    Hi,
    Guys just adding to your posts -
    Java docs says -
    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.
    All the three types of choicegroup -
    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,

  5. #5
    Registered User
    Join Date
    Nov 2008
    Posts
    40

    Thumbs up Re: Combo Box - J2ME

    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.

  6. #6
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: Combo Box - J2ME

    Quote Originally Posted by CSFYPMAIL View Post
    Thanx guys for that.Just wanted to ask if anyone has any examples of Choice.POPUP
    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,

Similar Threads

  1. J2ME or C++ for VoIP on Mobile Phone
    By sandeepkumar03 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2008-11-13, 20:14
  2. Acessing voice channel using J2ME
    By diegomello in forum VoIP
    Replies: 1
    Last Post: 2008-10-21, 15:57
  3. Can J2ME be used for sending MMS Message ?
    By seno_ap in forum Mobile Java General
    Replies: 1
    Last Post: 2006-11-24, 14:36
  4. Drop-down box in J2ME
    By ashishga in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2006-02-17, 03:08
  5. need urgent guidance on j2me
    By cogni_niru in forum Mobile Java General
    Replies: 1
    Last Post: 2005-11-13, 15:02

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×