1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| JLabel jeton = new JLabel(new ImageIcon("images/bases/"+element+"_m"+mouvement+"_p"+rotation+".png"));
jeton.setPreferredSize(new Dimension(50,50));
jeton.setBounds(posX, posY, 50, 50);
JLabel jeton_pdv = new JLabel(new ImageIcon("images/vie/vie_0"+vie_jeton+".png"));
jeton_pdv.setPreferredSize(new Dimension(50,50));
jeton_pdv.setBounds(posX, posY, 50, 50);
JLabel jeton_att1 = new JLabel(new ImageIcon("images/attaque/att_0"+att1+"_p"+rotation1+".png"));
jeton_att1.setPreferredSize(new Dimension(50,50));
jeton_att1.setBounds(posX, posY, 50, 50);
JLabel jeton_att2 = new JLabel(new ImageIcon("images/attaque/att_0"+att2+"_p"+rotation3+".png"));
jeton_att2.setPreferredSize(new Dimension(50,50));
jeton_att2.setBounds(posX, posY, 50, 50);
JLabel jeton_def1 = new JLabel(new ImageIcon("images/defense/def_0"+def1+"_p"+rotation2+".png"));
jeton_def1.setPreferredSize(new Dimension(50,50));
jeton_def1.setBounds(posX, posY, 50, 50);
JLabel jeton_def2 = new JLabel(new ImageIcon("images/defense/def_0"+def2+"_p"+rotation4+".png"));
jeton_def2.setPreferredSize(new Dimension(50,50));
jeton_def2.setBounds(posX, posY, 50, 50);
JLabel filtre = new JLabel(new ImageIcon("images/filtre.png"));
filtre.setPreferredSize(new Dimension(50,50));
filtre.setBounds(posX, posY, 50, 50);
//Eclipse me trouve "parfois" une erreur dans une des 6 lignes ci-dessous
// Ce n'est jamais la même ligne qui est en cause.
this.combat.plateau.couches_jeton.add(jeton, new Integer(3));
this.combat.plateau.couches_jeton.add(jeton_pdv, new Integer(4));
this.combat.plateau.couches_jeton.add(jeton_att1, new Integer(5));
this.combat.plateau.couches_jeton.add(jeton_att2, new Integer(6));
this.combat.plateau.couches_jeton.add(jeton_def1, new Integer(7));
this.combat.plateau.couches_jeton.add(jeton_def2, new Integer(8)); |
Partager