Java tutorial
import java.awt.KeyboardFocusManager; public class Main { public static void main(String[] argv) throws Exception { KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner(); } }