单项选择题(2006年4月二级考试)

下列方法中,不属于WindowListener接口的是【 】

A、windowOpened()

B、windowClosed()

C、windowAetivated()

D、mouseDragged()

答案解析

D

【解析】

窗口事件接口WindowListener的方法有:

public void windowClosing(WindowEvent e)是把退出窗口的语句写在本方法中;

public void windowOpened(WindowEvent e)是窗口打开时调用;

public void windowClosed(WindowEvent e)是窗口关闭时调用;

public void windowIconified(WindowEvent e)是窗口图标化时调用;

public void windowDeiconified(WindowEvent e)是窗口非图标化时调用;

public void windowActived(WindowEvent e)是窗口激活时调用;

public void windowDeactived(WindowEvent e)是窗口非激活时调用。

关键词

public;void;接口;调用;java;程序;设计;事件;语句;