Java中ActionEvent不使用内部类

2014-11-24 14:43:52 · 作者: · 浏览: 16

This program shows mainly how to add the events to the buttons. Normally we use the internal class, but this example does not use it. Instead, it uses a bloc "actionPerformed" that enables a couple of buttons to call it. To determine on which button the action event occurred, we use e.getSource().