Commit 23696705 authored by Hugo DACLON's avatar Hugo DACLON
Browse files
parents 5e924051 89ddf056
...@@ -16,8 +16,8 @@ public class Resultat extends JDialog { ...@@ -16,8 +16,8 @@ public class Resultat extends JDialog {
private JButton quitter; private JButton quitter;
private JButton rejouer; private JButton rejouer;
private JButton nouvelleFlotte; private JButton nouvelleFlotte;
private JLabel gagner; private ImagePanel gagner;
private JLabel perdu; private ImagePanel perdu;
private JPanel vide; private JPanel vide;
public static final int WIDTH = 600; public static final int WIDTH = 600;
...@@ -47,33 +47,37 @@ public class Resultat extends JDialog { ...@@ -47,33 +47,37 @@ public class Resultat extends JDialog {
try { try {
rejouer = new JButton(new ImageIcon((ImageIO.read(new File("img/interface/bouton/resultat/BoutonRejouer1.png"))) 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( rejouer.setRolloverIcon(
new ImageIcon((ImageIO.read(new File("img/interface/bouton/resultat/BoutonRejouer1Hover.png"))) 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( rejouer.setPressedIcon(
new ImageIcon((ImageIO.read(new File("img/interface/bouton/resultat/BoutonRejouer1Pressed.png"))) 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); rejouer.setPreferredSize(DIMENSION_REJOUER);
nouvelleFlotte = new JButton( nouvelleFlotte = new JButton(
new ImageIcon((ImageIO.read(new File("img/interface/bouton/resultat/BoutonRetourFlotte1.png"))) 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( nouvelleFlotte.setRolloverIcon(
new ImageIcon((ImageIO.read(new File("img/interface/bouton/resultat/BoutonRetourFlotte1Hover.png"))) 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( nouvelleFlotte.setPressedIcon(
new ImageIcon((ImageIO.read(new File("img/interface/bouton/resultat/BoutonRetourFlotte1Pressed.png"))) 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); nouvelleFlotte.setPreferredSize(DIMENSION_NOUVELLEFLOTTE);
quitter = new JButton(new ImageIcon((ImageIO.read(new File("img/interface/bouton/resultat/BoutonQuitter1.png"))) 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( quitter.setRolloverIcon(
new ImageIcon((ImageIO.read(new File("img/interface/bouton/resultat/BoutonQuitter1Hover.png"))) 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( quitter.setPressedIcon(
new ImageIcon((ImageIO.read(new File("img/interface/bouton/resultat/BoutonQuitter1Pressed.png"))) 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); 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( }catch(
IOException e) IOException e)
...@@ -81,12 +85,16 @@ public class Resultat extends JDialog { ...@@ -81,12 +85,16 @@ public class Resultat extends JDialog {
quitter = new JButton("Quitter"); quitter = new JButton("Quitter");
rejouer = new JButton("Refaire une partie"); rejouer = new JButton("Refaire une partie");
nouvelleFlotte = new JButton("Créer une nouvelle flotte"); nouvelleFlotte = new JButton("Créer une nouvelle flotte");
gagner = new JLabel("Vous avez gagné !"); gagner = new ImagePanel();
perdu = new JLabel("Vous avez perdu !"); perdu = new ImagePanel();
System.out.println("erreur lors du chargement d'une image"); System.out.println("erreur lors du chargement d'une image");
e.printStackTrace(); 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 centre = new JPanel();
JPanel sud = new JPanel(); JPanel sud = new JPanel();
...@@ -94,6 +102,7 @@ public class Resultat extends JDialog { ...@@ -94,6 +102,7 @@ public class Resultat extends JDialog {
lay.setHgap(50); lay.setHgap(50);
sud.setLayout(lay); sud.setLayout(lay);
vide = new JPanel();
vide.setPreferredSize(new Dimension(75,100)); vide.setPreferredSize(new Dimension(75,100));
sud.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