Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Which high level control can accept key input event?

 
Nigel Chou
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I only know Canvas can accept key input events. But Canvas is a low level control.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The addKEyListener method is implemented by Component, so everything that extends from Component can accept key input.
 
Nigel Chou
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ulf Dittmer:
The addKEyListener method is implemented by Component, so everything that extends from Component can accept key input.


Sorry, I mean in J2ME. J2ME does not have Component.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
D'oh! I missed the J2ME part. Aren't there javadocs for J2ME which answer this question in the same way I found the answer for J2SE?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic