I have created one form using Swing in Java.In the form I have used one textfield on which I have to set the focus whenever I press the key.How to set focus on a particular
This would work..
SwingUtilities.invokeLater( new Runnable() { public void run() { Component.requestFocus(); } } );