Commit 23696705 authored by Hugo DACLON's avatar Hugo DACLON
Browse files
parents 5e924051 89ddf056
......@@ -16,8 +16,8 @@ public class Resultat extends JDialog {
private JButton quitter;
private JButton rejouer;
private JButton nouvelleFlotte;
private JLabel gagner;
private JLabel perdu;
private ImagePanel gagner;
private ImagePanel perdu;
private JPanel vide;
public static final int WIDTH = 600;
......@@ -47,33 +47,37 @@ public class Resultat extends JDialog {
try {
rejouer = new JButton(new ImageIcon((ImageIO.read(new File("img/interface/bouton/resultat/BoutonRejouer1.png")))
.getScaledInstance(175, 70, Image.SCALE_SMOOTH)));
.getScaledInstance(150, 75, Image.SCALE_SMOOTH)));
rejouer.setRolloverIcon(
new ImageIcon((ImageIO.read(new File("img/interface/bouton/resultat/BoutonRejouer1Hover.png")))
.getScaledInstance(175, 70, Image.SCALE_SMOOTH)));
.getScaledInstance(150, 75, Image.SCALE_SMOOTH)));
rejouer.setPressedIcon(
new ImageIcon((ImageIO.read(new File("img/interface/bouton/resultat/BoutonRejouer1Pressed.png")))
.getScaledInstance(175, 70, Image.SCALE_SMOOTH)));
.getScaledInstance(150, 75, Image.SCALE_SMOOTH)));
rejouer.setPreferredSize(DIMENSION_REJOUER);
nouvelleFlotte = new JButton(
new ImageIcon((ImageIO.read(new File("img/interface/bouton/resultat/BoutonRetourFlotte1.png")))
.getScaledInstance(175, 70, Image.SCALE_SMOOTH)));
.getScaledInstance(150, 75, Image.SCALE_SMOOTH)));
nouvelleFlotte.setRolloverIcon(
new ImageIcon((ImageIO.read(new File("img/interface/bouton/resultat/BoutonRetourFlotte1Hover.png")))
.getScaledInstance(175, 70, Image.SCALE_SMOOTH)));
.getScaledInstance(150, 75, Image.SCALE_SMOOTH)));
nouvelleFlotte.setPressedIcon(
new ImageIcon((ImageIO.read(new File("img/interface/bouton/resultat/BoutonRetourFlotte1Pressed.png")))
.getScaledInstance(175, 70, Image.SCALE_SMOOTH)));
.getScaledInstance(150, 75, Image.SCALE_SMOOTH)));
nouvelleFlotte.setPreferredSize(DIMENSION_NOUVELLEFLOTTE);
quitter = new JButton(new ImageIcon((ImageIO.read(new File("img/interface/bouton/resultat/BoutonQuitter1.png")))
.getScaledInstance(175, 70, Image.SCALE_SMOOTH)));
.getScaledInstance(150, 75, Image.SCALE_SMOOTH)));
quitter.setRolloverIcon(
new ImageIcon((ImageIO.read(new File("img/interface/bouton/resultat/BoutonQuitter1Hover.png")))
.getScaledInstance(175, 70, Image.SCALE_SMOOTH)));
.getScaledInstance(150, 75, Image.SCALE_SMOOTH)));
quitter.setPressedIcon(
new ImageIcon((ImageIO.read(new File("img/interface/bouton/resultat/BoutonQuitter1Pressed.png")))
.getScaledInstance(175, 70, Image.SCALE_SMOOTH)));
.getScaledInstance(150, 75, Image.SCALE_SMOOTH)));
quitter.setPreferredSize(DIMENSION_QUITTER);
gagner = new ImagePanel("img/interface/background/ResultatGagne1.png");
gagner.setPreferredSize(new Dimension(600, 300));
perdu = new ImagePanel("img/interface/background/ResultatPerdu1.png");
perdu.setPreferredSize(new Dimension(600, 300));
}catch(
IOException e)
......@@ -81,12 +85,16 @@ public class Resultat extends JDialog {
quitter = new JButton("Quitter");
rejouer = new JButton("Refaire une partie");
nouvelleFlotte = new JButton("Créer une nouvelle flotte");
gagner = new JLabel("Vous avez gagné !");
perdu = new JLabel("Vous avez perdu !");
gagner = new ImagePanel();
perdu = new ImagePanel();
System.out.println("erreur lors du chargement d'une image");
e.printStackTrace();
}
quitter.setPreferredSize(new Dimension(150,75));
rejouer.setPreferredSize(new Dimension(150,75));
nouvelleFlotte.setPreferredSize(new Dimension(150,75));
JPanel centre = new JPanel();
JPanel sud = new JPanel();
......@@ -94,6 +102,7 @@ public class Resultat extends JDialog {
lay.setHgap(50);
sud.setLayout(lay);
vide = new JPanel();
vide.setPreferredSize(new Dimension(75,100));
sud.setPreferredSize(new Dimension(75,100));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment