aspose file tools*
The moose likes Beginning Java and the fly likes Setting Focus in a Panel, not frame? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Setting Focus in a Panel, not frame?" Watch "Setting Focus in a Panel, not frame?" New topic
Author

Setting Focus in a Panel, not frame?

Salue Lek
Greenhorn

Joined: Jul 13, 2001
Posts: 4

Hello all,
I am trying to set focus in a jtextfield that's in a panel. It is not on a frame so it doesn't have a window opened().
thanks,
Salue
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Components have a requestFocus() method that can be used for this.


"JavaRanch, where the deer and the Certified play" - David O'Meara
Salue Lek
Greenhorn

Joined: Jul 13, 2001
Posts: 4

Cindy,
thanks for the reply. I'm trying to figure out where to put the requestFocus() method. Where would I insert that code?
thanks,
Salue
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Setting Focus in a Panel, not frame?