• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Setting Focus in a DeleteKeyListener  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to clear out a non-editable combo box using the delete key. The delete key has a listener attached to it, which tries to force the focus to the previous combo box when the delete key is released. This all seems to be working alright except that when the action listener on the previous combo box fires, I have a check on the listener which checks to see if the component has focus and it's failing that check. Even though I've called requestFocusInWindow() method on the previous combo box, within the delete key listener.

I need for it to return true when it does the check on to see if the component has focus.

Note: I've tried using the invokeLater() and that doesn't seem to work either.

Any help would be much appreciated!!
Mindy
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!