[单项选择题] Swing中要响应动作事件必须实现ActionListener接口,而实现ActionListenrer接口必须实现的方法是 ( )。
A.actionPerformed()
B.focusGained()
C.actionMoved()
D.focusLost()
参考答案:
A问题解析:
本题考查关于事件响应中Action Listener方法的基本知识。选项A正确, acfionPerformed()方法是ActionListener接口中的唯一方法;选项B错误,focusGained()方法是FocusListener接口中的方法;选项C错误, ActionListener接口中没有actionMoved();选项D错误,focusGained()方法是FocusListener接口中的方法。故本题答案是A。

![[单项选择题] Swing中要响应动作事件必须实现ActionListener接口,而实现ActionListenrer接口必须实现的方法是 ( )。 [单项选择题] Swing中要响应动作事件必须实现ActionListener接口,而实现ActionListenrer接口必须实现的方法是 ( )。](http://www.mshxw.com/aiimages/31/253920.png)
