modification makefile + transsition fenetre pair programing

This commit is contained in:
2024-10-26 17:40:26 +02:00
parent 5bef75ddba
commit f5c3fa6149
31 changed files with 24 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
package controller;
import view.App;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@@ -10,6 +11,7 @@ public class ResListener implements ActionListener {
@Override
public void actionPerformed(ActionEvent e) {
SwingUtilities.invokeLater(() -> new GameView());
App.getInstance().dispose();
}
}

View File

@@ -0,0 +1,17 @@
package view;
import javax.swing.*;
public class App {
private static JFrame frame;
public static JFrame getInstance() {
if (frame == null) {
frame = new JFrame("Menu");
frame.setSize(1500, 750);
frame.setLocationRelativeTo(null);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
return frame;
}
}