首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
Swing中要响应动作事件必须实现ActionListener接口,而实现ActionListenrer接口必须实现的方法是 ( )。
Swing中要响应动作事件必须实现ActionListener接口,而实现ActionListenrer接口必须实现的方法是 ( )。
admin
2010-02-22
29
问题
Swing中要响应动作事件必须实现ActionListener接口,而实现ActionListenrer接口必须实现的方法是 ( )。
选项
A、actionPerformed()
B、focusGained()
C、actionMoved()
D、focusLost()
答案
1
解析
本题考查关于事件响应中Action Listener方法的基本知识。选项A正确, acfionPerformed()方法是ActionListener接口中的唯一方法;选项B错误,focusGained()方法是FocusListener接口中的方法;选项C错误, ActionListener接口中没有actionMoved();选项D错误,focusGained()方法是FocusListener接口中的方法。故本题答案是A。
转载请注明原文地址:https://jikaoti.com/ti/94b0FFFM
本试题收录于:
二级Java题库NCRE全国计算机二级分类
0
二级Java
NCRE全国计算机二级
相关试题推荐
下面对表单若干常用事件的描述中,正确的是
让控件获得焦点,使其成为活动对象的方法是
为表单建立了快捷方式mymenu,调用快捷菜单的命令代码DomymenuWITHTHIS应该放在表单的哪个事件中?
使用下图,表单名称为Form1,表单中有两个命令按钮(Command1和Command2)、两个标签、两个文本框(Text1和Text2)如果想在运行表单时,向Text2中输入字符,回显字符显示的是’’*’’号,则可以在Form1的Init事件
下面属于黑盒测试方法的是
假定一个表单里有一个文本框Text1和一个命令按钮组CommandGroup1。命令按钮组是一个容器对象,其中包含Command1和Command2两个命令按钮。如果要在Command1命令按钮的某个方法中访问文本框的Value属性值,不正确的表达式是
随机试题
万维网的特点不包括()
关于TAT的特性正确的是
小儿预防接种程序正确的是
急救物品应做到“五定”,不包括
成年子宫体与宫颈的比例是
下列关于沉井不排水下沉水下封底技术要求的说法,错误的是()。
已开具的发票,税务机关有权调出查验;空白发票,税务机关无权调出查验。()
2018年11月18日,国家主席习近平在出席亚太经合组织第二十六次领导人非正式会议时指出,我们要坚定维护以开放、包容为基础的多边贸易体制,旗帜鲜明抵制保护主义。()
WhatisMr.Bush’smainpurposeofthetrip?
A、Hewillbeathisopponentsbyafewvotes.B、He’sthemostpromisingcandidatefortheschoolboard.C、Hewillbesupportedby
最新回复
(
0
)