正在加载图片...
GreetingApplet as an Action Event Handler r To set a Greeting Applet object be an action event handler, we must 1. Import the Java event-handling classes 2. Modify the class declaration to include the clause implements Action Listener. 3. Add the action Performed method to the class definition 4. Register the Greeting Applet object to the event source inputline as its action event listener. (An event source will call the registered listeners action Performed method when the event occurs.) C 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 5-7© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 5 - 7 GreetingApplet as an Action Event Handler To set a GreetingApplet object be an action event handler, we must 1. Import the Java event-handling classes. 2. Modify the class declaration to include the clause implements ActionListener. 3. Add the actionPerformed method to the class definition. 4. Register the GreetingApplet object to the event source inputLine as its action event listener. (An event source will call the registered listeners’ actionPerformed method when the event occurs.)
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有