arrangé grille

This commit is contained in:
diane 2023-04-18 17:24:22 +02:00
parent bf2ee3efd7
commit bfc7fb6379
1 changed files with 6 additions and 6 deletions

View File

@ -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;