• 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

Tabbing from a JComboBox inside JTable

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a JComboBox inside a JTable. When it has editing focus, it takes me two tabs to traverse to the next cell.
All my other cell editors based on JTextField are working fine. I did have to extend JTextField and set isManagingFocus on the JTextField to true.
I have tried this with the JComboBox as well as creating my own JComboBox editor using the extended JTextField with no luck.
Can anyone help? Thanks.
 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might try adding a keyListener to the combo box. When it sees a tab it could call stopEditing() on the table, and send the tab onto the table. Don't know if that would work. Or you could kludge it to send out a second tab event....
e
 
Joe Vigor
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I so far have been unable to catch a tab key in a JComboBox. I tried adding listeners to the components, but to no avail for the Tab key.
 
Destroy anything that stands in your way. Except this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic