JAVA-getComponent()与getSource()
来源:互联网 发布:手机建站cms 编辑:程序博客网 时间:2024/06/11 01:30
两个方法都是获取发生事件的事件源对象,区别也许是返回的类型不同,如果是getSource()需要强制类型转换为Component 对象;而getComponent()无需转换;
API的说明如下:
类ComponentEvent
getComponent()返回发起事件的 Component 对象,如果该对象不是一个 Component,则返回 null。
类EventObject
getSource()返回最初发生 Event 的对象。
阅读全文
0 0
- JAVA-getComponent()与getSource()
- Ext.getBody()、getDom()、getCmp()、getFly()、get()、getComponent()、getSource()的区别?
- java getSource()和 getActionCommand()
- java getSource()和 getActionCommand()
- getSource与getActionCommand的区别
- java getSource()和 getActionCommand()区别
- unity3d GetComponent
- GetComponent优化
- JAVA事件处理中e.getSource()和e.getActionCommand()方法的区别
- JAVA事件处理中e.getSource()和e.getActionCommand()方法的区别
- 剪切板Clipboard、SetComponent、GetComponent
- getComponent()方法的应用
- Unity Find GetComponent
- unity3d GetComponent函数
- GetComponent<T>()详解
- 尽量少用GetComponent
- Transform.Find();,FindObjectOfType<>();,GetComponent<>()
- Swing getSource() 使用的注意事项
- java8
- 【tika】读取各个文件数据
- android——悬浮图标(FloatingActionButton)
- bzoj3028 食物(生成函数+Lucas)
- learning to hash
- JAVA-getComponent()与getSource()
- bzoj5020 在美妙的数学王国中畅游【LCT+泰勒展开】
- Linux下Android开发环境搭建
- jdbc之mysql连接与操作
- 使用threejs离屏渲染实现高斯模糊效果
- 1006. 换个格式输出整数 (15)-浙大PAT乙级真题java实现
- 【高等数学】极限计算&中值定理&多元函数微分学
- HTML表单颜色选择器
- 在eclipse中修改maven插件