Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User nathviswa's Avatar
    Join Date
    Dec 2010
    Posts
    39
    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 ??

  2. #2
    Nokia Developer Champion raj_J2ME's Avatar
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,314
    Quote Originally Posted by nathviswa View Post
    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,

Similar Threads

  1. Keylistener in a MIDLet?
    By gemilib in forum Mobile Java General
    Replies: 4
    Last Post: 2010-04-19, 12:27
  2. designning a KeyListener
    By TacB0sS in forum Mobile Java General
    Replies: 12
    Last Post: 2009-09-02, 07:00
  3. KErrPermissionDenied and Keylistener
    By gemilib in forum Symbian C++
    Replies: 3
    Last Post: 2007-10-29, 11:52
  4. 可以通过电脑向手&
    By jllts2000 in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2004-12-02, 10:07
  5. Replies: 1
    Last Post: 2004-08-04, 08:16

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved