j2me Links in canvas

If I have text in a canvas (drawString) how do I get it to be clickable by the user to perform some action? I didn't use a form because I am not able to lay it out as I want to, doing it on a canvas has a lot more flexibility. I'm trying to build a menu by drawing the text in the middle of the canvas then i want the user to be able to navigate through each text and select one of them, at which point a different screen would appear.

[444 byte] By [aztec32a] at [2007-11-26 19:06:18]
# 1

You basically need to implement the logic for the hyperlink click. Meaning, use a cursor so that the coordinates are checked once the cursor reaches your string area/hyper link area, change it to a hand symbol just like how the browsers do and implement the corresponding commandAction based on the key pressed event.

Also, need implement some kind of a listener patten to get this functionality.

(or )

Extending/Using the CustomItem functionality would be a better approach rather than re-inventing the wheel.

~Mohan

itsmohana at 2007-7-9 20:57:25 > top of Java-index,Java Mobility Forums,Java ME Technologies...