Title: Unable to set focus
try putting the following lines in
 
SwingUtilities.invokeLater()
{
    JTextField1.setRequestFocusEnabled(true);
        JTextField1().requestFocus();
}
-----Original Message-----
From: Mario Fernandes (IT Dept. - Langley) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 27, 2001 4:19 PM
To: '[EMAIL PROTECTED]'
Subject: Unable to set focus

Hi

I am unable to set focus on a JTextfield inspite  of  using the code below

        JTextField1.setRequestFocusEnabled(true);
        JTextField1().requestFocus();

Instead the focus is always on another field which is a JPasswordField.

These are the only two fields on the screen(login screen). I am not setting focus on the password field at any point of time.

many thanks in advance.

mario



----------------------------------------------------------------------------------------------------------------------------
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential
and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please
contact the sender and delete the material from any computer.
----------------------------------------------------------------------------------------------------------------------------

Reply via email to