Click to See Complete Forum and Search --> : Problem with focus on a particular component


Manav Gupta
August 20th, 1999, 12:20 AM
Hello all,
I am using Swings in JDK1.2.
I want to set focus by default on a JTextField(in a JPanel) when I open
the dialogbox(JDialog). Here is the code I am using for same.

textf1.setRequestFocusEnabled(true);
textf1.requestFocus();

But this doesnt set the focus.

pls help
thanks in advance.

manav