public void setImageProvider(ImageProvider imageProvider) {
this.imageProvider = imageProvier;
repaint();
}
butGo.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
canvas.setImageProvider(new ImageProvider() {
public Image getImage() {
String n = combo.getSelectedItem();
Image image = new ImageIcon(n + ".jpg").getImage();
return image;
}
});
}
});