In J2ME how should we add a customitem inside the canvas.Because i need to perform key event handling for customitem.The key event handling is allowed in canvas not in form.So i try to use canvas instead of form.
You can handle the pressed key event by implementing the keyPressed method within the CustomItem, and just use a Form and CustomItems. If this won't work for you because of some special key events (like happens to me), then I don't have an straight answer... yet.
But AFAIK, you can't "add" something to a canvas, instead, you can keep references of what you want the Canvas to show, and just print it on the paint method.
Thanks for ur kind information
How to add canvas in custom Item... Please Suggest me...???
Ads