KeyEvent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • true blue
    New Member
    • Jul 2007
    • 8

    #1

    KeyEvent

    Plz tell what is the use of making a panel set focusable
    <p.setFocusable (true);>
    while using key events is this necessary?
    Last edited by true blue; Jul 28 '07, 08:43 AM. Reason: have posted same ques twice by mistake
  • blazedaces
    Contributor
    • May 2007
    • 284

    #2
    Originally posted by true blue
    Plz tell what is the use of making a panel set focusable
    <p.setFocusable (true);>
    while using key events is this necessary?
    You just posted in the previous thread, but here's the link again to the tutorial:

    http://java.sun.com/docs/books/tutorial/uiswing/events/keylistener.htm l

    Here's what I suggest, download the example and try NOT setting setFocusable(tr ue) and see if it works. That will tell you simply if it is necessary. Beforehand it worked, if it doesn't work afterhand you know it's necessary. If it does, you know it's not...

    -blazed

    Comment

    Working...