Java Swing Tutorial - Java KeyboardFocusManager .clearGlobalFocusOwner ()








Syntax

KeyboardFocusManager.clearGlobalFocusOwner() has the following syntax.

public void clearGlobalFocusOwner()

Example

In the following code shows how to use KeyboardFocusManager.clearGlobalFocusOwner() method.

import java.awt.KeyboardFocusManager;

public class Main {
  public static void main(String[] argv) throws Exception {

    KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner();
  }
}