The CounterApplet Class
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class CounterApplet extends Applet implements ActionListener {
public void init() {…}
public void actionPerformed(ActionEvent e) {…}
Button incButton, decButton; // Instance variables
TextField valField;
Counter ctr;
}
Previous slide
Next slide
Back to first slide
View graphic version