J2ME selectable images

O

Oz Mortimer

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 (e-mail address removed)

Many Thanks
Oz.
 
D

Darryl L. Pierce

Oz Mortimer said:
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.
 
O

Oz Mortimer

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.
 
D

Darryl L. Pierce

Oz Mortimer said:
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. :)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,522
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top