modification makefile + transsition fenetre pair programing
This commit is contained in:
@@ -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();
|
||||
|
||||
}
|
||||
}
|
17
src/main/java/view/App.java
Normal file
17
src/main/java/view/App.java
Normal 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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user