AWT事件总结.
事件类别 描述信息 接口名 方法
ActionEvent 激活组件 ActionListener acctionPerformed(ActionEvent)
ItemEvent 选择了某些项目 ItemListener itemStateChanfed(ItemEvent)
MouseEvent 鼠标移动 MouseMotionListener mouseDragged(MouseEvent)
mouseMoved(MouseEvent)
鼠标点击等 MouseListener mousePressed(MouseEvent)
mouseReleased(MouseEvent)
mouseEntered(MouseEvent)
mouseExited(MouseEvent)
mouseClicked(MouseEvent)
KeyEvent 键盘输入 KeyListener keyPressed(KeyEvent)
keyReleased(KeyEvent)
FocussEvent 组件收到或失去焦点 FocusListener focusGained(FocusEvent)
focusLost(FocusEvent)
AdjustmentEvent 移动了滚动条等组件 AdjustmentListener adjustmentValueChanged(AdjustmentEvent)
ComponentEvent 对象移动缩放显示隐藏等ComponentListener componentMoved(ComponentEvent)
componentHidden(ComponentEvent)
componentResized(ComponentEvent)
WindowEvent 窗口收到窗口级事件 WindowListener windowClosing(WindowEvent)
windowOpened(WindowEvent)
windowIconified(WindowEvent)
windowDeiconified(WindowEvent)
windowActivated(WindowEvent)
windowDeactivated(WindowEvent)
ContainerEvent 容器中增加删除了组件 ContainerListener componentAdded(ContainerEvent)
componentRemoved(ContainerEvent)
TextEvent 文本字段文本区发生改变 TextListener textValueChanged(TextEvent)