• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Setting Focus in a DeleteKeyListener

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic