Commit 5b930c99 authored by L.Perine's avatar L.Perine
Browse files

changement layout

parent 23696705
......@@ -64,7 +64,6 @@ public class ChoixModePartie extends JDialog {
new ImageIcon((ImageIO.read(new File("img/interface/bouton/choixMode/BoutonCreer1Pressed.png")))
.getScaledInstance((int) DIMENSION_HOST.getWidth(), (int) DIMENSION_HOST.getHeight(),
Image.SCALE_SMOOTH)));
etreHost.setPreferredSize(DIMENSION_HOST);
etreGuest = new JButton(new ImageIcon(
(ImageIO.read(new File("img/interface/bouton/choixMode/BoutonTrouver1.png"))).getScaledInstance(
(int) DIMENSION_GUEST.getWidth(), (int) DIMENSION_GUEST.getHeight(), Image.SCALE_SMOOTH)));
......@@ -76,7 +75,6 @@ public class ChoixModePartie extends JDialog {
new ImageIcon((ImageIO.read(new File("img/interface/bouton/choixMode/BoutonTrouver1Pressed.png")))
.getScaledInstance((int) DIMENSION_GUEST.getWidth(), (int) DIMENSION_GUEST.getHeight(),
Image.SCALE_SMOOTH)));
etreGuest.setPreferredSize(DIMENSION_GUEST);
retourChoix = new JButton(new ImageIcon(
(ImageIO.read(new File("img/interface/bouton/choixMode/BoutonRetour1.png"))).getScaledInstance(
(int) DIMENSION_CHOIX.getWidth(), (int) DIMENSION_CHOIX.getHeight(), Image.SCALE_SMOOTH)));
......@@ -87,7 +85,7 @@ public class ChoixModePartie extends JDialog {
new ImageIcon((ImageIO.read(new File("img/interface/bouton/choixMode/BoutonRetour1Pressed.png")))
.getScaledInstance((int) DIMENSION_CHOIX.getWidth(), (int) DIMENSION_CHOIX.getHeight(),
Image.SCALE_SMOOTH)));
retourChoix.setPreferredSize(DIMENSION_CHOIX);
} catch (IOException e) {
etreHost = new JButton("Créer une partie");
......@@ -96,45 +94,15 @@ public class ChoixModePartie extends JDialog {
System.out.println("erreur lors du chargement d'une image");
e.printStackTrace();
}
choix.setLayout(new GridLayout(5, 5));
choix.add(new JPanel());
choix.add(new JPanel());
choix.add(new JPanel());
choix.add(new JPanel());
choix.add(new JPanel());
choix.add(new JPanel());
choix.add(etreHost);
choix.add(new JPanel());
choix.add(etreGuest);
choix.add(new JPanel());
choix.add(new JPanel());
choix.add(new JPanel());
choix.add(new JPanel());
choix.add(new JPanel());
choix.add(new JPanel());
choix.add(new JPanel());
choix.add(new JPanel());
choix.add(retourChoix);
choix.add(new JPanel());
choix.add(new JPanel());
choix.add(new JPanel());
choix.add(new JPanel());
choix.add(new JPanel());
choix.add(new JPanel());
choix.add(new JPanel());
choix.setPreferredSize(new Dimension(750, 200));
this.setLayout(new BorderLayout());
choix.add(etreHost,BorderLayout.NORTH);
choix.add(etreGuest,BorderLayout.EAST);
choix.add(retourChoix,BorderLayout.SOUTH);
choix.setVisible(true);
panelPrincipal.add(choix);
appli.setBgColorComponents(panelPrincipal);
this.setContentPane(panelPrincipal);
this.setPreferredSize(new Dimension(WIDTH, HEIGHT));
this.setLocation((screenWidth - WIDTH) / 2, (screenHeight - HEIGHT) / 2);
this.pack();
this.setResizable(false);
......
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