J2ME selectable images

Discussion in 'Java' started by Oz Mortimer, Sep 15, 2003.

  1. Oz Mortimer

    Oz Mortimer Guest

    Hi,

    Is there any way that I can create a selectable image? I have tried using
    List and ChoiceGroup but this doesnt seem to give the results I require!.

    I want to create a menu list using images within a grid - similat to the
    VodaPhone Live service.

    Any advice examples?

    Email me on

    Many Thanks
    Oz.
     
    Oz Mortimer, Sep 15, 2003
    #1
    1. Advertising

  2. Oz Mortimer <> wrote:
    > Is there any way that I can create a selectable image? I have tried using
    > List and ChoiceGroup but this doesnt seem to give the results I require!.
    >
    > I want to create a menu list using images within a grid - similat to the
    > VodaPhone Live service.
    >
    > Any advice examples?


    I'm not sure I understand what you're trying to do. You want to setup a
    grid of icons and select from that? If so, you'll have to write your own
    custom widget to do the job as there's nothing of the sort in the LCDUI.
    You can use the javax.microedition.lcdui.Canvas class and draw
    individual Image objects onto the canvas. But, you'll have the
    responsibility for handling key navigation, focus, etc. as well.

    Good luck.

    --
    Darryl L. Pierce <>
    Visit the Infobahn Offramp - <http://bellsouthpwp.net/m/c/mcpierce>
    "What do you care what other people think, Mr. Feynman?"
     
    Darryl L. Pierce, Sep 15, 2003
    #2
    1. Advertising

  3. Oz Mortimer

    Oz Mortimer Guest

    Hi Darryl,
    > I'm not sure I understand what you're trying to do. You want to setup a
    > grid of icons and select from that? If so, you'll have to write your own
    > custom widget to do the job as there's nothing of the sort in the LCDUI.
    > You can use the javax.microedition.lcdui.Canvas class and draw
    > individual Image objects onto the canvas. But, you'll have the
    > responsibility for handling key navigation, focus, etc. as well.
    >

    Thanks for that!... any examples of this where you have a grid of say 4x4
    icons where if an icon is selected you will then be taken to the next
    screen?

    Many Thanks
    Oz.
     
    Oz Mortimer, Sep 16, 2003
    #3
  4. Oz Mortimer <> wrote:
    >> I'm not sure I understand what you're trying to do. You want to setup a
    >> grid of icons and select from that? If so, you'll have to write your own
    >> custom widget to do the job as there's nothing of the sort in the LCDUI.
    >> You can use the javax.microedition.lcdui.Canvas class and draw
    >> individual Image objects onto the canvas. But, you'll have the
    >> responsibility for handling key navigation, focus, etc. as well.
    >>

    > Thanks for that!... any examples of this where you have a grid of say 4x4
    > icons where if an icon is selected you will then be taken to the next
    > screen?


    Not really. But, it's a relatively simple task to perform. Just extend
    the Canvas class and override the paint(Graphics) method to paint the
    icons and to hilight the currently selected one. Override the
    keyPressed(int), converting the passed keyCode to its game action value
    and then handle the navigation and selection events. Piosa cais. :)

    --
    Darryl L. Pierce <>
    Visit the Infobahn Offramp - <http://bellsouthpwp.net/m/c/mcpierce>
    "What do you care what other people think, Mr. Feynman?"
     
    Darryl L. Pierce, Sep 17, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Goldin

    Selectable DataGrid

    Mark Goldin, Feb 26, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    559
    Mark Goldin
    Feb 26, 2004
  2. =?Utf-8?B?RWQgQ2hpdQ==?=

    Can CheckBoxList be selectable singlely

    =?Utf-8?B?RWQgQ2hpdQ==?=, Nov 14, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    342
    =?Utf-8?B?RWQgQ2hpdQ==?=
    Nov 14, 2004
  3. David Hearn
    Replies:
    3
    Views:
    9,434
    David Hearn
    Mar 7, 2005
  4. =?Utf-8?B?U2FtdWVs?=
    Replies:
    5
    Views:
    2,661
    Steven Cheng[MSFT]
    Aug 8, 2005
  5. Peter
    Replies:
    3
    Views:
    456
    Ken Cox [Microsoft MVP]
    Oct 13, 2005
Loading...

Share This Page