SIVAKUMAR
Adding customitem in canvas in J2ME?
3 Answer(s)      4 years and 6 months ago
Posted in : MobileApplications

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.

Advertisement
View Answers

November 4, 2010 at 3:37 PM


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.



November 4, 2010 at 4:10 PM


Thanks for ur kind information



September 24, 2013 at 10:58 AM


How to add canvas in custom Item... Please Suggest me...???