aspose file tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Request Focus Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Request Focus" Watch "Request Focus" New topic

Request Focus

Nagu Rathina
Ranch Hand

Joined: Jun 17, 2002
Posts: 31
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

Joined: Jan 30, 2002
Posts: 3451
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

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17260

I would think after show is where you want to call requestFocus().

Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: Request Focus