• Post Reply Bookmark Topic Watch Topic
  • New Topic

Please help with KeyboardFocusManager!  RSS feed

 
Robert Miller
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working with a dialogue box containing text fields. I need to add logic so that if a certain character is entered, the focus progresses to the next field. I'm using KeyboardFocusManager.focusNextComponent() and that works fine.

I also need to add logic so that if another character is entered, the focus returns to the first field. I can't find a method in KeyboardFocusManager to do that, and I also can't find any documentation that addresses this problem.

Can this be done with KeyboardFocusManager, or do I have to try another approach?

Robert
 
Lionel Badiou
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Robert,

To put the focus on a component you should use this :


Best regards,
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!