Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Request Focus

 
Nagu Rathina
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Friends,
In a dialog, I have a text field. I want to have focus in it, whenever the dialog shows. should I have jtxtseat.requesFocus() called before showing or after showing?
sometimes even if the cursor blinks, I am not able to type data w/o clicking on the field once. why is it so?
Help me.
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nagu,
Supply some more info or maybe even some code so we can give you an opinion. Is the dialog modal? Is it regenerated or reused?
Michael Morris
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would think after show is where you want to call requestFocus().
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic