getSource与getActionCommand的区别
来源:互联网 发布:java 断点 编辑:程序博客网 时间:2024/06/08 02:45
getSource与getActionCommand的区别
转载▼
getSource()
Returns:
The object on which the Event initially occurred.
依赖于事件对象
getActionCommand()
Returns the command name of the action event fired by this button. If the command name is null (default) then this method returns the label of the button.
依赖于按钮上的字符串
getSource得到的组件的名称,而getActionCommand得到的是标签。
如:Button bt=new Button("buttons");
0 0
- getSource与getActionCommand的区别
- java getSource()和 getActionCommand()区别
- JAVA事件处理中e.getSource()和e.getActionCommand()方法的区别
- JAVA事件处理中e.getSource()和e.getActionCommand()方法的区别
- java getSource()和 getActionCommand()
- java getSource()和 getActionCommand()
- getSourse() 与getActionCommand 区别
- JAVA-getComponent()与getSource()
- Ext.getBody()、getDom()、getCmp()、getFly()、get()、getComponent()、getSource()的区别?
- Swing getSource() 使用的注意事项
- 多按钮的事件相应,getActionCommand & setActionCommand篇
- getActionCommand()用法
- 语言琐碎:getActionCommand
- ImageIcon用getSource加载图片
- &&与&,||与| 的区别
- &与&& ,|与||的区别
- -> 与 .的区别,&与*
- &与&& ,|与||的区别
- C/C++中判断某一文件或目录是否存在
- Android编译系统参考手册
- Quartz2.2.1+spring4.0.6出现的异常
- c#
- Android分享操作
- getSource与getActionCommand的区别
- Python String 常用 API
- R dataframe basic operations
- LeetCode—Maximum Product Subarray
- 华为:工作感想(1)
- HTTPS连接最初的若干毫秒
- Cramfs、JFFS2、YAFFS2的全面对比
- android4.0:在Fragment中播放优酷视频
- 金士顿内存条型号的意义!