package Action;

import IHM.WorkingImage;
import Window.Interface;

import javax.swing.*;
import java.awt.event.ActionEvent;

public class ActionChooseImage extends AbstractAction {

    private int pos;

    public ActionChooseImage(String s, int i) {
        super(s);
        pos = i;
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        WorkingImage.getInstance().changeImage(pos);
        Interface.getInstance().showWindow();
    }
}