This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes 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