题目内容

下列事件()表明在一个组件之上有一个按键按下

A. KeyEvent
B. KeyDownEvent
C. KeyPressEvent
D. KeyTypedEvent

查看答案
更多问题

可以做操作()来创建一个监听类,当鼠标移动时,它可以接受事件。

A. 通过继承MouseListener接口
B. 通过实现MouseListener接口
C. 通过继承MouseMotionListener接口
D. 通过实现MouseMotionListener接口

如果有一个对象myListener实现了ActionListener接口,下列哪条语句使得myListener对象能够接受处理来自于smallButton按钮对象的动作事件?()

A. smallButton.add(myListener);
B. smallButton.addListener(myListener);
C. smallButton.addActionListener(myListener);
D. smallButton.addItem(myListener);

如果希望所有的组件在界面上均匀排列,应该使用哪种布局管理器?()。

A. BoxLayout
B. GridLayout
C. BorderLayout
D. FlowLayout

下列事件监听器中,无法对TextField对象进行事件监听和处理的是()

ActionListener
B. FocusListener
C. MouseMotionListener
D. WindowListener

答案查题题库