The WindowFocusListener Interface: respond to a window gaining or losing the focus : WindowFocusListener « Swing Event « Java Tutorial






Defined MethodsDescription
windowGainedFocus(WindowEvent e)Called when the window gains the focus such that the window or one of its components will receive keyboard events.
windowLostFocus(WindowEvent e)Called when the window loses the focus. After this event, neither the window nor any of its components will receive keyboard events.


15.42.WindowFocusListener
15.42.1.The WindowFocusListener Interface: respond to a window gaining or losing the focus
15.42.2.All the IDs for mouse events are defined in the MouseEvent class