Java Swing Focus requestFocus(final JComponent component)

Here you can find the source of requestFocus(final JComponent component)

Description

request Focus

License

Open Source License

Declaration

public static void requestFocus(final JComponent component) 

Method Source Code

//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
        });
    }
}

Related

  1. removeFocus(JComponent component)
  2. requestComponentFocus(final Window win, final JComponent comp)
  3. requestComponentFocus(final Window win, final JComponent comp)
  4. requestFocus(final JComponent comp)
  5. requestFocus(final JComponent comp)
  6. requestFocus(final Window win, final Component comp)
  7. requestFocusInWindow(final Component c)
  8. selectAllOnFocusGained()
  9. selectAndFocus(JComponent component)