Files
SAE21_2023/src/GMSaverActionListener.java

20 lines
502 B
Java
Raw Normal View History

2024-04-29 20:06:02 +02:00
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class GMSaverActionListener implements ActionListener {
private Window parentFrame;
private GMGrid grid;
public GMSaverActionListener(Window parentFrame, GMGrid grid) {
this.parentFrame = parentFrame;
this.grid = grid;
}
@Override
public void actionPerformed(ActionEvent e) {
GMSaver gMSaver = new GMSaver(parentFrame, grid);
gMSaver.saveGridIfNeeded();
}
}