From bfc7fb6379d42b9faa98cb9e5edf9349a11d5aa2 Mon Sep 17 00:00:00 2001 From: diane Date: Tue, 18 Apr 2023 17:24:22 +0200 Subject: [PATCH] =?UTF-8?q?arrang=C3=A9=20grille?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/graphique/MaJFrame.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/graphique/MaJFrame.java b/src/graphique/MaJFrame.java index 3380e42..b4a5dae 100644 --- a/src/graphique/MaJFrame.java +++ b/src/graphique/MaJFrame.java @@ -135,7 +135,7 @@ public class MaJFrame extends JFrame { panelEnsemble.setLayout(gbl_panelEnsemble); //création panel Map - panelMap = new JPanelImage("map1.jpg"); + panelMap = new JPanelImage("map1.png"); GridBagConstraints gbc_panelMap = new GridBagConstraints(); gbc_panelMap.insets = new Insets(0, 0, 18, 5); gbc_panelMap.fill = GridBagConstraints.BOTH; @@ -151,21 +151,21 @@ public class MaJFrame extends JFrame { panelGrille.setOpaque(false); panelMap.add(panelGrille, "panelGrille"); GridBagLayout gbl_panelGrille = new GridBagLayout(); - gbl_panelGrille.columnWidths = new int[] {56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56}; - gbl_panelGrille.rowHeights = new int[] {45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45}; + gbl_panelGrille.columnWidths = new int[] {75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75}; + gbl_panelGrille.rowHeights = new int[] {71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71}; gbl_panelGrille.columnWeights = new double[]{0.0}; gbl_panelGrille.rowWeights = new double[]{0.0}; panelGrille.setLayout(gbl_panelGrille); //ajout joueur - lblJoueur = new JLabel(); + lblJoueur = new JLabel();//"map1.jpg" lblJoueur.setText("J"); lblJoueur.setForeground(new Color(255, 128, 0)); joueurIcon = new ImageIcon("joueur.png"); lblJoueur.setIcon(joueurIcon); GridBagConstraints gbc_joueur = new GridBagConstraints(); - gbc_joueur.fill = GridBagConstraints.BOTH; + gbc_joueur.fill = GridBagConstraints.CENTER; gbc_joueur.gridx = 2; gbc_joueur.gridy = 4; gbc_joueur.gridwidth = 1; // Occupy 1 column @@ -273,7 +273,7 @@ public class MaJFrame extends JFrame { gbc_progressBarAttaque.gridy = 1; panelScore.add(progressBarAttaque, gbc_progressBarAttaque); - lblNbZombiesTues = new JLabel("nombre de zombies tués :"); + lblNbZombiesTues = new JLabel(" nombre de zombies tués : "); lblNbZombiesTues.setForeground(new Color(240, 240, 240)); GridBagConstraints gbc_lblNbZombiesTues = new GridBagConstraints(); gbc_lblNbZombiesTues.anchor = GridBagConstraints.SOUTH;