ajout grille (conception et affichage), essai joueur
This commit is contained in:
parent
27a7ffdb77
commit
a48c472332
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
|
|
@ -33,12 +33,12 @@ public class JPanelDessin extends JPanel {
|
||||||
x=0;
|
x=0;
|
||||||
y=0;
|
y=0;
|
||||||
while (y<height) {
|
while (y<height) {
|
||||||
g.setColor(Color.magenta);
|
g.setColor(new Color(235, 235, 235));
|
||||||
g.drawLine(0, y, width, y);
|
g.drawLine(0, y, width, y);
|
||||||
y= y + height/11;
|
y= y + height/11;
|
||||||
}
|
}
|
||||||
while (x<width) {
|
while (x<=width) {
|
||||||
g.setColor(Color.magenta);
|
g.setColor(new Color(235, 235, 235));
|
||||||
g.drawLine(x, 0, x, height);
|
g.drawLine(x, 0, x, height);
|
||||||
x= x + width/11;
|
x= x + width/11;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,8 @@ import java.awt.Insets;
|
||||||
import javax.swing.JSpinner;
|
import javax.swing.JSpinner;
|
||||||
import javax.swing.SpinnerNumberModel;
|
import javax.swing.SpinnerNumberModel;
|
||||||
import javax.swing.JProgressBar;
|
import javax.swing.JProgressBar;
|
||||||
|
import java.awt.CardLayout;
|
||||||
|
import javax.swing.JLayeredPane;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -44,10 +46,10 @@ public class MaJFrame extends JFrame {
|
||||||
|
|
||||||
private JPanel contentPane;
|
private JPanel contentPane;
|
||||||
private static final long serialVersionUID = 7252959164975426293L;
|
private static final long serialVersionUID = 7252959164975426293L;
|
||||||
private JPanel panel;
|
private JPanel panelBoutonJouer;
|
||||||
private JPanel panel_1;
|
private JPanel panelEnsemble;
|
||||||
private JLabel lblNewLabel;
|
private JLabel lblZombicide;
|
||||||
private JPanel panel_2;
|
private JPanel panelInfo;
|
||||||
private JButton btnDeplacer;
|
private JButton btnDeplacer;
|
||||||
private JButton btnTuer;
|
private JButton btnTuer;
|
||||||
private JSpinner deplacementX;
|
private JSpinner deplacementX;
|
||||||
|
|
@ -55,13 +57,14 @@ public class MaJFrame extends JFrame {
|
||||||
private JLabel lblDepX;
|
private JLabel lblDepX;
|
||||||
private JLabel lblDepY;
|
private JLabel lblDepY;
|
||||||
private JLabel lblScore;
|
private JLabel lblScore;
|
||||||
private JPanel panel_3;
|
private JPanel panelScore;
|
||||||
private JLabel lblScoreVie;
|
private JLabel lblScoreVie;
|
||||||
private JLabel lblAttaque;
|
private JLabel lblAttaque;
|
||||||
private JProgressBar progressBarVie;
|
private JProgressBar progressBarVie;
|
||||||
private JProgressBar progressBarAttaque;
|
private JProgressBar progressBarAttaque;
|
||||||
private JPanel panel_4;
|
private JPanelImage panelMap;
|
||||||
private JPanelImage panel_5;
|
private JPanelDessin panelGrille;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -89,20 +92,20 @@ public class MaJFrame extends JFrame {
|
||||||
setTitle("Zombicide");
|
setTitle("Zombicide");
|
||||||
setBackground(new Color(128, 0, 0));
|
setBackground(new Color(128, 0, 0));
|
||||||
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
setBounds(100, 100, 715, 551);
|
setBounds(100, 100, 752, 558);
|
||||||
contentPane = new JPanel();
|
contentPane = new JPanel();
|
||||||
contentPane.setBackground(new Color(128, 0, 0));
|
contentPane.setBackground(new Color(128, 0, 0));
|
||||||
contentPane.setBorder(new EmptyBorder(2, 2, 2, 2));
|
contentPane.setBorder(new EmptyBorder(2, 2, 2, 2));
|
||||||
contentPane.setLayout(new BorderLayout(0, 0));
|
contentPane.setLayout(new BorderLayout(0, 0));
|
||||||
setContentPane(contentPane);
|
setContentPane(contentPane);
|
||||||
|
|
||||||
//création panel avec bouton
|
//création panel bouton Jouer
|
||||||
panel = new JPanel();
|
panelBoutonJouer = new JPanel();
|
||||||
panel.setBorder(null);
|
panelBoutonJouer.setBorder(null);
|
||||||
panel.setBackground(new Color(64, 0, 0));
|
panelBoutonJouer.setBackground(new Color(64, 0, 0));
|
||||||
contentPane.add(panel); //, "cell 10 10,grow"
|
contentPane.add(panelBoutonJouer); //, "cell 10 10,grow"
|
||||||
contentPane.add(panel, BorderLayout.NORTH);
|
contentPane.add(panelBoutonJouer, BorderLayout.NORTH);
|
||||||
panel.setLayout(new BorderLayout(0, 0));
|
panelBoutonJouer.setLayout(new BorderLayout(0, 0));
|
||||||
|
|
||||||
JButton btnJouer = new JButton("JOUER !");
|
JButton btnJouer = new JButton("JOUER !");
|
||||||
btnJouer.setForeground(new Color(255, 255, 255));
|
btnJouer.setForeground(new Color(255, 255, 255));
|
||||||
|
|
@ -112,51 +115,85 @@ public class MaJFrame extends JFrame {
|
||||||
clicBoutonJouer();
|
clicBoutonJouer();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
panel.add(btnJouer);
|
panelBoutonJouer.add(btnJouer);
|
||||||
|
|
||||||
//création panel_1 IMAGE
|
//création panelEnsemble contient panelMap et panelInofo
|
||||||
panel_1 = new JPanel();
|
panelEnsemble = new JPanel();
|
||||||
panel_1.setBorder(null);
|
panelEnsemble.setBorder(null);
|
||||||
contentPane.add(panel_1, BorderLayout.CENTER);
|
contentPane.add(panelEnsemble, BorderLayout.CENTER);
|
||||||
GridBagLayout gbl_panel_1 = new GridBagLayout();
|
GridBagLayout gbl_panelEnsemble = new GridBagLayout();
|
||||||
gbl_panel_1.columnWidths = new int[] {620, 75, 0};
|
gbl_panelEnsemble.columnWidths = new int[] {620, 75, 0};
|
||||||
gbl_panel_1.rowHeights = new int[]{489, 0};
|
gbl_panelEnsemble.rowHeights = new int[]{489, 0};
|
||||||
gbl_panel_1.columnWeights = new double[]{0.0, 0.0, Double.MIN_VALUE};
|
gbl_panelEnsemble.columnWeights = new double[]{0.0, 0.0};
|
||||||
gbl_panel_1.rowWeights = new double[]{0.0, Double.MIN_VALUE};
|
gbl_panelEnsemble.rowWeights = new double[]{0.0, Double.MIN_VALUE};
|
||||||
panel_1.setLayout(gbl_panel_1);
|
panelEnsemble.setLayout(gbl_panelEnsemble);
|
||||||
|
|
||||||
panel_5 = new JPanelImage("map1.jpg");
|
//création panel Map
|
||||||
FlowLayout flowLayout = (FlowLayout) panel_5.getLayout();
|
panelMap = new JPanelImage("map1.jpg");
|
||||||
flowLayout.setVgap(0);
|
GridBagConstraints gbc_panelMap = new GridBagConstraints();
|
||||||
flowLayout.setHgap(0);
|
gbc_panelMap.insets = new Insets(0, 0, 0, 5);
|
||||||
GridBagConstraints gbc_panel_5 = new GridBagConstraints();
|
gbc_panelMap.fill = GridBagConstraints.BOTH;
|
||||||
gbc_panel_5.insets = new Insets(0, 0, 0, 5);
|
gbc_panelMap.gridx = 0;
|
||||||
gbc_panel_5.fill = GridBagConstraints.BOTH;
|
gbc_panelMap.gridy = 0;
|
||||||
gbc_panel_5.gridx = 0;
|
panelEnsemble.add(panelMap, gbc_panelMap);
|
||||||
gbc_panel_5.gridy = 0;
|
panelMap.setLayout(new CardLayout(0, 0));
|
||||||
panel_1.add(panel_5, gbc_panel_5);
|
|
||||||
|
|
||||||
lblNewLabel = new JLabel("ZOMBICIDE");
|
//création panel Grille
|
||||||
lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 40));
|
panelGrille = new JPanelDessin();
|
||||||
lblNewLabel.setForeground(new Color(255, 255, 255));
|
panelGrille.setBackground(null);
|
||||||
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
panelGrille.setForeground(new Color(235, 235, 235));
|
||||||
panel_5.add(lblNewLabel);
|
panelGrille.setOpaque(false);
|
||||||
lblNewLabel.setVisible(true);
|
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.columnWeights = new double[]{0.0};
|
||||||
|
gbl_panelGrille.rowWeights = new double[]{0.0};
|
||||||
|
panelGrille.setLayout(gbl_panelGrille);
|
||||||
|
|
||||||
// création panel_2 Boutons
|
|
||||||
panel_2 = new JPanel();
|
// panelGrille = new JPanel();
|
||||||
panel_2.setBackground(new Color(95, 95, 95));
|
// panelGrille.setBackground(new Color(192, 192, 192));
|
||||||
GridBagConstraints gbc_panel_2 = new GridBagConstraints();
|
// panelGrille.setForeground(new Color(128, 0, 64));
|
||||||
gbc_panel_2.fill = GridBagConstraints.BOTH;
|
// panelMap.add(panelGrille, "panelGrille");
|
||||||
gbc_panel_2.gridx = 1;
|
// GridBagLayout gbl_panelGrille = new GridBagLayout();
|
||||||
gbc_panel_2.gridy = 0;
|
// gbl_panelGrille.columnWidths = new int[] {56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56};
|
||||||
panel_1.add(panel_2, gbc_panel_2);
|
// gbl_panelGrille.rowHeights = new int[] {45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45};
|
||||||
GridBagLayout gbl_panel_2 = new GridBagLayout();
|
// gbl_panelGrille.columnWeights = new double[]{0.0};
|
||||||
gbl_panel_2.columnWidths = new int[] {75};
|
// gbl_panelGrille.rowWeights = new double[]{0.0};
|
||||||
gbl_panel_2.rowHeights = new int[] {20, 100, 91, 30, 30, 30, 30, 10, 91, 0};
|
// panelGrille.setLayout(gbl_panelGrille);
|
||||||
gbl_panel_2.columnWeights = new double[]{1.0};
|
// //ajout joueur
|
||||||
gbl_panel_2.rowWeights = new double[]{0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
|
// GridBagConstraints gbc_panelGrille = new GridBagConstraints();
|
||||||
panel_2.setLayout(gbl_panel_2);
|
// gbc_panelGrille.fill = GridBagConstraints.BOTH;
|
||||||
|
// gbc_panelGrille.gridx = 2;
|
||||||
|
// gbc_panelGrille.gridy = 4;
|
||||||
|
// gbc_panelGrille.gridwidth = 1; // Occupy 1 column
|
||||||
|
// gbc_panelGrille.gridheight = 1; // Occupy 1 row
|
||||||
|
// gbc_panelGrille.anchor = GridBagConstraints.CENTER;
|
||||||
|
// panelGrille.add("joueur.png", gbc_panelGrille);
|
||||||
|
|
||||||
|
|
||||||
|
lblZombicide = new JLabel("ZOMBICIDE");
|
||||||
|
lblZombicide.setFont(new Font("Tahoma", Font.BOLD, 40));
|
||||||
|
lblZombicide.setForeground(new Color(255, 255, 255));
|
||||||
|
lblZombicide.setHorizontalAlignment(SwingConstants.CENTER);
|
||||||
|
panelMap.add(lblZombicide, "lblZombicide");
|
||||||
|
lblZombicide.setVisible(true);
|
||||||
|
|
||||||
|
// création panelInfo
|
||||||
|
panelInfo = new JPanel();
|
||||||
|
panelInfo.setBackground(new Color(95, 95, 95));
|
||||||
|
GridBagConstraints gbc_panelInfo = new GridBagConstraints();
|
||||||
|
gbc_panelInfo.fill = GridBagConstraints.BOTH;
|
||||||
|
gbc_panelInfo.gridx = 1;
|
||||||
|
gbc_panelInfo.gridy = 0;
|
||||||
|
panelEnsemble.add(panelInfo, gbc_panelInfo);
|
||||||
|
GridBagLayout gbl_panelInfo = new GridBagLayout();
|
||||||
|
gbl_panelInfo.columnWidths = new int[] {75};
|
||||||
|
gbl_panelInfo.rowHeights = new int[] {20, 100, 91, 30, 30, 30, 30, 10, 91, 0};
|
||||||
|
gbl_panelInfo.columnWeights = new double[]{1.0};
|
||||||
|
gbl_panelInfo.rowWeights = new double[]{0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
|
||||||
|
panelInfo.setLayout(gbl_panelInfo);
|
||||||
|
|
||||||
lblScore = new JLabel("Scores");
|
lblScore = new JLabel("Scores");
|
||||||
lblScore.setForeground(new Color(240, 240, 240));
|
lblScore.setForeground(new Color(240, 240, 240));
|
||||||
|
|
@ -166,7 +203,7 @@ public class MaJFrame extends JFrame {
|
||||||
gbc_lblScore.insets = new Insets(0, 0, 5, 0);
|
gbc_lblScore.insets = new Insets(0, 0, 5, 0);
|
||||||
gbc_lblScore.gridx = 0;
|
gbc_lblScore.gridx = 0;
|
||||||
gbc_lblScore.gridy = 0;
|
gbc_lblScore.gridy = 0;
|
||||||
panel_2.add(lblScore, gbc_lblScore);
|
panelInfo.add(lblScore, gbc_lblScore);
|
||||||
|
|
||||||
btnDeplacer = new JButton("Déplacer");
|
btnDeplacer = new JButton("Déplacer");
|
||||||
btnDeplacer.setIcon(null);
|
btnDeplacer.setIcon(null);
|
||||||
|
|
@ -175,20 +212,20 @@ public class MaJFrame extends JFrame {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
panel_3 = new JPanel();
|
panelScore = new JPanel();
|
||||||
panel_3.setBackground(new Color(95, 95, 95));
|
panelScore.setBackground(new Color(95, 95, 95));
|
||||||
GridBagConstraints gbc_panel_3 = new GridBagConstraints();
|
GridBagConstraints gbc_panelScore = new GridBagConstraints();
|
||||||
gbc_panel_3.anchor = GridBagConstraints.NORTH;
|
gbc_panelScore.anchor = GridBagConstraints.NORTH;
|
||||||
gbc_panel_3.insets = new Insets(0, 0, 5, 0);
|
gbc_panelScore.insets = new Insets(0, 0, 5, 0);
|
||||||
gbc_panel_3.gridx = 0;
|
gbc_panelScore.gridx = 0;
|
||||||
gbc_panel_3.gridy = 1;
|
gbc_panelScore.gridy = 1;
|
||||||
panel_2.add(panel_3, gbc_panel_3);
|
panelInfo.add(panelScore, gbc_panelScore);
|
||||||
GridBagLayout gbl_panel_3 = new GridBagLayout();
|
GridBagLayout gbl_panelScore = new GridBagLayout();
|
||||||
gbl_panel_3.columnWidths = new int[] {30, 10};
|
gbl_panelScore.columnWidths = new int[] {30, 10};
|
||||||
gbl_panel_3.rowHeights = new int[] {30, 90, 0};
|
gbl_panelScore.rowHeights = new int[] {30, 90, 0};
|
||||||
gbl_panel_3.columnWeights = new double[]{1.0, 0.0};
|
gbl_panelScore.columnWeights = new double[]{1.0, 0.0};
|
||||||
gbl_panel_3.rowWeights = new double[]{0.0, 0.0, 1.0};
|
gbl_panelScore.rowWeights = new double[]{0.0, 0.0, 1.0};
|
||||||
panel_3.setLayout(gbl_panel_3);
|
panelScore.setLayout(gbl_panelScore);
|
||||||
|
|
||||||
lblScoreVie = new JLabel("Vies");
|
lblScoreVie = new JLabel("Vies");
|
||||||
lblScoreVie.setForeground(new Color(240, 240, 240));
|
lblScoreVie.setForeground(new Color(240, 240, 240));
|
||||||
|
|
@ -198,7 +235,7 @@ public class MaJFrame extends JFrame {
|
||||||
gbc_lblScoreVie.insets = new Insets(0, 0, 5, 5);
|
gbc_lblScoreVie.insets = new Insets(0, 0, 5, 5);
|
||||||
gbc_lblScoreVie.gridx = 0;
|
gbc_lblScoreVie.gridx = 0;
|
||||||
gbc_lblScoreVie.gridy = 0;
|
gbc_lblScoreVie.gridy = 0;
|
||||||
panel_3.add(lblScoreVie, gbc_lblScoreVie);
|
panelScore.add(lblScoreVie, gbc_lblScoreVie);
|
||||||
|
|
||||||
lblAttaque = new JLabel("Attaque");
|
lblAttaque = new JLabel("Attaque");
|
||||||
lblAttaque.setForeground(new Color(240, 240, 240));
|
lblAttaque.setForeground(new Color(240, 240, 240));
|
||||||
|
|
@ -208,7 +245,7 @@ public class MaJFrame extends JFrame {
|
||||||
gbc_lblAttaque.insets = new Insets(0, 0, 5, 0);
|
gbc_lblAttaque.insets = new Insets(0, 0, 5, 0);
|
||||||
gbc_lblAttaque.gridx = 1;
|
gbc_lblAttaque.gridx = 1;
|
||||||
gbc_lblAttaque.gridy = 0;
|
gbc_lblAttaque.gridy = 0;
|
||||||
panel_3.add(lblAttaque, gbc_lblAttaque);
|
panelScore.add(lblAttaque, gbc_lblAttaque);
|
||||||
|
|
||||||
progressBarVie = new JProgressBar();
|
progressBarVie = new JProgressBar();
|
||||||
progressBarVie.setForeground(new Color(0, 255, 0));
|
progressBarVie.setForeground(new Color(0, 255, 0));
|
||||||
|
|
@ -220,7 +257,7 @@ public class MaJFrame extends JFrame {
|
||||||
gbc_progressBarVie.insets = new Insets(0, 0, 5, 5);
|
gbc_progressBarVie.insets = new Insets(0, 0, 5, 5);
|
||||||
gbc_progressBarVie.gridx = 0;
|
gbc_progressBarVie.gridx = 0;
|
||||||
gbc_progressBarVie.gridy = 1;
|
gbc_progressBarVie.gridy = 1;
|
||||||
panel_3.add(progressBarVie, gbc_progressBarVie);
|
panelScore.add(progressBarVie, gbc_progressBarVie);
|
||||||
|
|
||||||
progressBarAttaque = new JProgressBar();
|
progressBarAttaque = new JProgressBar();
|
||||||
progressBarAttaque.setForeground(new Color(255, 0, 0));
|
progressBarAttaque.setForeground(new Color(255, 0, 0));
|
||||||
|
|
@ -232,21 +269,15 @@ public class MaJFrame extends JFrame {
|
||||||
gbc_progressBarAttaque.fill = GridBagConstraints.VERTICAL;
|
gbc_progressBarAttaque.fill = GridBagConstraints.VERTICAL;
|
||||||
gbc_progressBarAttaque.gridx = 1;
|
gbc_progressBarAttaque.gridx = 1;
|
||||||
gbc_progressBarAttaque.gridy = 1;
|
gbc_progressBarAttaque.gridy = 1;
|
||||||
panel_3.add(progressBarAttaque, gbc_progressBarAttaque);
|
panelScore.add(progressBarAttaque, gbc_progressBarAttaque);
|
||||||
|
|
||||||
panel_4 = new JPanel();
|
//création boutonDeplacer
|
||||||
GridBagConstraints gbc_panel_4 = new GridBagConstraints();
|
|
||||||
gbc_panel_4.insets = new Insets(0, 0, 0, 5);
|
|
||||||
gbc_panel_4.fill = GridBagConstraints.BOTH;
|
|
||||||
gbc_panel_4.gridx = 0;
|
|
||||||
gbc_panel_4.gridy = 2;
|
|
||||||
panel_3.add(panel_4, gbc_panel_4);
|
|
||||||
GridBagConstraints gbc_btnDeplacer = new GridBagConstraints();
|
GridBagConstraints gbc_btnDeplacer = new GridBagConstraints();
|
||||||
gbc_btnDeplacer.fill = GridBagConstraints.BOTH;
|
gbc_btnDeplacer.fill = GridBagConstraints.BOTH;
|
||||||
gbc_btnDeplacer.insets = new Insets(0, 0, 5, 0);
|
gbc_btnDeplacer.insets = new Insets(0, 0, 5, 0);
|
||||||
gbc_btnDeplacer.gridx = 0;
|
gbc_btnDeplacer.gridx = 0;
|
||||||
gbc_btnDeplacer.gridy = 2;
|
gbc_btnDeplacer.gridy = 2;
|
||||||
panel_2.add(btnDeplacer, gbc_btnDeplacer);
|
panelInfo.add(btnDeplacer, gbc_btnDeplacer);
|
||||||
|
|
||||||
lblDepX = new JLabel("déplacement X");
|
lblDepX = new JLabel("déplacement X");
|
||||||
lblDepX.setForeground(new Color(240, 240, 240));
|
lblDepX.setForeground(new Color(240, 240, 240));
|
||||||
|
|
@ -256,7 +287,7 @@ public class MaJFrame extends JFrame {
|
||||||
gbc_lblDepX.insets = new Insets(0, 0, 5, 0);
|
gbc_lblDepX.insets = new Insets(0, 0, 5, 0);
|
||||||
gbc_lblDepX.gridx = 0;
|
gbc_lblDepX.gridx = 0;
|
||||||
gbc_lblDepX.gridy = 3;
|
gbc_lblDepX.gridy = 3;
|
||||||
panel_2.add(lblDepX, gbc_lblDepX);
|
panelInfo.add(lblDepX, gbc_lblDepX);
|
||||||
|
|
||||||
deplacementX = new JSpinner();
|
deplacementX = new JSpinner();
|
||||||
deplacementX.setFont(new Font("Tahoma", Font.PLAIN, 10));
|
deplacementX.setFont(new Font("Tahoma", Font.PLAIN, 10));
|
||||||
|
|
@ -265,7 +296,7 @@ public class MaJFrame extends JFrame {
|
||||||
gbc_deplacementX.insets = new Insets(0, 0, 5, 0);
|
gbc_deplacementX.insets = new Insets(0, 0, 5, 0);
|
||||||
gbc_deplacementX.gridx = 0;
|
gbc_deplacementX.gridx = 0;
|
||||||
gbc_deplacementX.gridy = 4;
|
gbc_deplacementX.gridy = 4;
|
||||||
panel_2.add(deplacementX, gbc_deplacementX);
|
panelInfo.add(deplacementX, gbc_deplacementX);
|
||||||
|
|
||||||
lblDepY = new JLabel("déplacement Y");
|
lblDepY = new JLabel("déplacement Y");
|
||||||
lblDepY.setForeground(new Color(240, 240, 240));
|
lblDepY.setForeground(new Color(240, 240, 240));
|
||||||
|
|
@ -275,7 +306,7 @@ public class MaJFrame extends JFrame {
|
||||||
gbc_lblDepY.insets = new Insets(0, 0, 5, 0);
|
gbc_lblDepY.insets = new Insets(0, 0, 5, 0);
|
||||||
gbc_lblDepY.gridx = 0;
|
gbc_lblDepY.gridx = 0;
|
||||||
gbc_lblDepY.gridy = 5;
|
gbc_lblDepY.gridy = 5;
|
||||||
panel_2.add(lblDepY, gbc_lblDepY);
|
panelInfo.add(lblDepY, gbc_lblDepY);
|
||||||
|
|
||||||
deplacementY = new JSpinner();
|
deplacementY = new JSpinner();
|
||||||
deplacementY.setFont(new Font("Tahoma", Font.PLAIN, 10));
|
deplacementY.setFont(new Font("Tahoma", Font.PLAIN, 10));
|
||||||
|
|
@ -284,8 +315,9 @@ public class MaJFrame extends JFrame {
|
||||||
gbc_deplacementY.insets = new Insets(0, 0, 5, 0);
|
gbc_deplacementY.insets = new Insets(0, 0, 5, 0);
|
||||||
gbc_deplacementY.gridx = 0;
|
gbc_deplacementY.gridx = 0;
|
||||||
gbc_deplacementY.gridy = 6;
|
gbc_deplacementY.gridy = 6;
|
||||||
panel_2.add(deplacementY, gbc_deplacementY);
|
panelInfo.add(deplacementY, gbc_deplacementY);
|
||||||
|
|
||||||
|
//création boutonTuer
|
||||||
btnTuer = new JButton("Tuer");
|
btnTuer = new JButton("Tuer");
|
||||||
btnTuer.addActionListener(new ActionListener() {
|
btnTuer.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
|
@ -295,13 +327,13 @@ public class MaJFrame extends JFrame {
|
||||||
gbc_btnTuer.fill = GridBagConstraints.BOTH;
|
gbc_btnTuer.fill = GridBagConstraints.BOTH;
|
||||||
gbc_btnTuer.gridx = 0;
|
gbc_btnTuer.gridx = 0;
|
||||||
gbc_btnTuer.gridy = 8;
|
gbc_btnTuer.gridy = 8;
|
||||||
panel_2.add(btnTuer, gbc_btnTuer);
|
panelInfo.add(btnTuer, gbc_btnTuer);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void clicBoutonJouer() {
|
public void clicBoutonJouer() {
|
||||||
lblNewLabel.setVisible(false);
|
lblZombicide.setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue