how to add double key listener

Discussion in 'Java' started by SaintSpeak, Dec 23, 2004.

  1. SaintSpeak

    SaintSpeak Guest

    hi,
    i want to catch the key event when SHIFT+TAB are pressed simultaneously
    to shift focus to the previous focusable component. the key event is
    caught on a JComboBox. if somebody knows the code to do so plz post it.
    thanx in advance.
    SaintSpeak, Dec 23, 2004
    #1
    1. Advertising

  2. SaintSpeak

    ByteCoder Guest

    SaintSpeak wrote:
    > hi,
    > i want to catch the key event when SHIFT+TAB are pressed simultaneously
    > to shift focus to the previous focusable component. the key event is
    > caught on a JComboBox. if somebody knows the code to do so plz post it.
    > thanx in advance.
    >


    Here you go:
    "How to write a key-listener"
    <http://java.sun.com/docs/books/tutorial/uiswing/events/keylistener.html>
    and:
    "How to use the focus subsystem"
    <http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html>

    It might be a little more than you expected or wanted, but at least
    you'll understand when you've read it. It is actually quite easy when
    you get the hang of it.

    --
    -------------
    - ByteCoder - ...I see stupid people
    -------------
    Curiosity *Skilled* the cat
    ByteCoder, Dec 23, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sydex
    Replies:
    12
    Views:
    6,453
    Victor Bazarov
    Feb 17, 2005
  2. Jeremy Watts
    Replies:
    1
    Views:
    2,502
    John B. Matthews
    Feb 2, 2009
  3. KevinSimonson

    What Is the Listener for Key Presses?

    KevinSimonson, Nov 29, 2010, in forum: Java
    Replies:
    2
    Views:
    315
    Roedy Green
    Dec 2, 2010
  4. M P
    Replies:
    1
    Views:
    455
  5. carlos
    Replies:
    1
    Views:
    137
    Paul Wilkins
    Feb 16, 2008
Loading...

Share This Page