Java Tutorial/Swing Event/WindowFocusListener
Версия от 17:44, 31 мая 2010; (обсуждение)
All the IDs for mouse events are defined in the MouseEvent class
- MOUSE_CLICKED
- MOUSE_PRESSED
- MOUSE_DRAGGED
- MOUSE_ENTERED
- MOUSE_EXITED
- MOUSE_RELEASED
- MOUSE_MOVED
- MOUSE_WHEEL
The WindowFocusListener Interface: respond to a window gaining or losing the focus
Defined MethodsDescriptionwindowGainedFocus(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.