[b]ActionEvent cannot be resolved to a type[/b]按照书上的例子,接着编写计算器,又发现这个错误。原来少引用了awt.event这个包。最后添上import java.awt.event.*;就好了