一个类要实现监听的步骤

    a.实现相应的接口(Keytener/MouseListener/ActionListener/WindowListener)

    b.把接口的处理方法根据需要重新编写(override)

    c. 注册监听

    d.设置监听的command,setActionCommand(),getActionCommand()

posted on 2012-08-06 15:11  Adonstein  阅读(146)  评论(0编辑  收藏  举报