MyCanvas: actionPerformed
public void actionPerformed(ActionEvent e) {
if (e.getSource()==red)
currentColor = new Color(255,0,0);
else
currentColor = new Color(0,255,0);
repaint();
}
Previous slide
Next slide
Back to first slide
View graphic version