jButton1.addActionListener(new PlusCaculator_btnCaculate_actionAdapter(this));这句是什么意思?

来源:百度知道 编辑:UC知道 时间:2024/09/26 14:10:19
jButton1.addActionListener(new PlusCaculator_btnCaculate_actionAdapter(this));
这句是什么意思?事件是这么写的吗?

给jButton1添加一个事件侦听器,就是new PlusCaculator_btnCaculate_actionAdapter(this)

换句话说,就是:
当jButton被按下的时候,所需要发生的事情定义在new PlusCaculator_btnCaculate_actionAdapter(this)里。