Overriding init:Listener Registration
public void init() {
red = new Button("red");
green = new Button("green");
Label textlabel = new Label("(oval/rect)");
shapeSpec = new TextField("oval");
add(red);
add(green);
add(textlabel);
add(shapeSpec);
red.addActionListener(this);
green.addActionListener(this);
...
}
Previous slide
Next slide
Back to first slide
View graphic version