正在加载图片...
Handling action Events-Action Listener import java. awt event. *i class MyFirstFrame extends Frame implements ActionListener Declare MyF irstFrame as an ActionListene public MyFirstFrame() Register MyF irstFrame as the action listener of both buttons cancelButton addActionListener( this okButton addActionListener( this C 2000 McGraw-Hill troduction to Object-Oriented Programming with Java--Wu Chapter 13-7© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 13 - 7 Handling Action Events - ActionListener import java.awt.event.*; class MyFirstFrame extends Frame implements ActionListener { . . . } public MyFirstFrame ( ) { . . . cancelButton.addActionListener( this ); okButton.addActionListener( this ); . . . } Declare MyFirstFrame as an ActionListener. Register MyFirstFrame as the action listener of both buttons
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有