am I write we need MIDlet as main class, and Canvas as another class that receives KeyListeners - up /down keys etc.
question - why not MIDlet itself receives key events ??
am I write we need MIDlet as main class, and Canvas as another class that receives KeyListeners - up /down keys etc.
question - why not MIDlet itself receives key events ??
As the event/key handler are there inside the Canvas itself and key event are generated from the Canvas only and hence that Canvas will be receiving the key events. MIDlet's is not aware of any of the activity that is happening inside the Canvas.
Therefore you override the all key handlers inside your canvas and you will be finding the events inside these respectively,
Thanks with Regards,
R a j - The K e r n e l
Join Delhi-NCR Nokia Developer's Community,