-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFenetreFin.java
31 lines (26 loc) · 981 Bytes
/
FenetreFin.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import javax.swing.*;
import java.awt.*;
public class FenetreFin extends JFrame{
public FenetreFin(Joueur j){
super("Game Over");
this.setSize(1920,1080);
this.setLocation(0,0);
this.setResizable(false);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JLabel photo=new JLabel(new ImageIcon("unobackground1.png"));
photo.setBounds(0,0,1920,1080);
JLabel gagnant=new JLabel();
gagnant.setText("Le gagnant est "+ j.nom +" avec un score de "+ j.score);
gagnant.setBounds(400,300,1400,400);
gagnant.setFont(new java.awt.Font("Segoe UI", 1, 50));
gagnant.setForeground(Color.YELLOW);
//JPanel principal
JPanel conteneurPrincipal = new JPanel();
conteneurPrincipal.setLayout(null);
conteneurPrincipal.setBounds(0,0,1920,1080);
conteneurPrincipal.add(gagnant);
conteneurPrincipal.add(photo);
this.add(conteneurPrincipal);
this.setVisible(true);
}
}