I have a simple application in Java Swing (created in VAJ 3.5) in which I have a JButton and a JTextField added to a JFrame.
When the application is run, the focus is on the JButton(by default).
I want the focus to be on the JTextField.
I have tried the following code(but it doesn't work) :
The same code works when I compile/execute it outside VAJ.
However suggestion to change the order of adding component to JFrame so that JTextField1 gets focus by default will not be helpful. Actually I want to implement requestFocus in an existing application with many JComponents.