Java Tutorial/Swing Event/WindowFocusListener — различия между версиями

Материал из Java эксперт
Перейти к: навигация, поиск
м (1 версия)
 
(нет различий)

Версия 20:44, 31 мая 2010

All the IDs for mouse events are defined in the MouseEvent class

  1. MOUSE_CLICKED
  2. MOUSE_PRESSED
  3. MOUSE_DRAGGED
  4. MOUSE_ENTERED
  5. MOUSE_EXITED
  6. MOUSE_RELEASED
  7. MOUSE_MOVED
  8. 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.