• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

VK_TAB event not working

 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, here is my code

However, when I press the tab key while on that text field, nothing is printed out. Does anyone know why?
[ July 11, 2002: Message edited by: Gregg Bolinger ]
 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Gregg,
I don't know why this happens, but if you want to catch this event to know, that the JTextField will lose the focus, then I would better do it with a FocusListener.
Anyway, it is strange. I could imagine that the Focus behavior will catch the key event somehow. And then the key event will be lost.
Rene
[ July 11, 2002: Message edited by: Rene Liebmann ]
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the event is being consumed in the InputMap of the JTextArea...

look at this bug report on Sun's site... down in the "Evaluation" section it shows an example of setting things in the InputMap... maybe you could clear out the InputMap of your JTextArea or replace the action that is invoked in the InputMap?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually I figured it out. YOu have to disable the traversable tabbing event and just handle it yourself. So when you press tab, you capture the keyPressed Event, and after you do whatever you do, you handle going to the next focusable component you want it to go to.
 
reply
    Bookmark Topic Watch Topic
  • New Topic