some changes

This commit is contained in:
2025-10-02 10:48:05 +02:00
parent 8b6d447574
commit 6ceeffac0e
14 changed files with 342 additions and 48 deletions

View File

@@ -0,0 +1,19 @@
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JOptionPane;
public class GridWindowClosedEvent extends WindowAdapter {
private GridWindow window;
public GridWindowClosedEvent(GridWindow window) {
this.window = window;
}
@Override
public void windowClosing(WindowEvent event) {
int result = JOptionPane.showConfirmDialog(this.window, "Are you sure you want to close this window?", "Close current window", JOptionPane.YES_NO_OPTION);
if(result == JOptionPane.YES_OPTION) this.window.dispose();
}
}