Here you can find the source of requestFocus(final JComponent component)
public static void requestFocus(final JComponent component)
//package com.java2s; import javax.swing.JComponent; import javax.swing.SwingUtilities; public class Main { public static void requestFocus(final JComponent component) { SwingUtilities.invokeLater(new Runnable() { public void run() { component.requestFocus(); }//w w w.j a v a2 s . co m }); } }