java ancestor_Java+Swing+常用事件和监听器接口

本文介绍了Java Swing中与祖先组件相关的事件处理,包括AncestorEvent及AncestorListener接口,详细讲解了ancestorAdded、ancestorMoved和ancestorRemoved等方法。同时,还涵盖了CaretEvent、ChangeEvent、HyperlinkEvent和InternalFrameEvent等其他重要事件及其监听器接口,如CaretListener、ChangeListener、HyperlinkListener和InternalFrameListener,展示了这些事件在文本编辑、状态变化、超链接交互和内部框架操作中的应用。
摘要由CSDN通过智能技术生成

事件

事件描述

事件方法

事件接口

接口方法

AncestorEvent

报告给子组件的事件

AncestorListener

ancestorAdded(AncestorEvent e)

ancestorMoved(AncestorEvent e)

ancestorRemoved(AncestorEvent e)

CaretEvent

通知感兴趣的参与

者事件

源中的文本插入符

已经发

生更改

CaretListener

caretUpdate(CareEvente)

ChangeEvent

通知感兴趣的参与

者事件

源中的状态已经发生更改

ChangeListener

stateChanged(ChangeEvent e)

HyperlinkEvent

通知感兴趣的参与

者发生

了与超文本链接有

关的事

HyperlinkListener

hyperlinkUpdate(HyperlinkEvent e)

InternalFrameEvent

以事件源

的形式

添加对

J

InternalFrame

对象的支持的

A

WTEvent

InternalFrameListener

internalFrameActivated(InternalFrameEvent e

)

internalFrameClosed(InternalFrameEvent e

)

internalFrameClosing(InternalFrameEvent e

)

internalFrameDeactived(InternalFrameEvent e

)

internalFrameDeiconified(InternalFrameEvent e

)

internalFrameIconified(InternalFrameEvent e

)

internalFrameOpened(InternalFrameEvent e

)

ListDataEvent

定义一个列表更改的事件

ListDataListener

contentsChanged(ListDataEvent e)

intervalAdded(ListDataEvent e)

intervalRemoved(ListDataEvent e)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值