MyCanvas: Overview
class MyCanvas extends Canvas implements ActionListener {
// constructor ???
public void paint(Graphics g) {
// just like earlier paint method of applet
}
public void actionPerformed(ActionEvent e) {
// just like earlier actionPerformed method of applet
}
// instance variables ???
}
Previous slide
Next slide
Back to first slide
View graphic version