From 3024a370c3eaa0075d1c619caa3f1adee867c335 Mon Sep 17 00:00:00 2001 From: "emile.malcuit" Date: Mon, 10 Feb 2025 11:49:54 +0100 Subject: [PATCH] En train de faire la fonction du boutton --- JDR/src/Presentation/Plateau_de_jeu.form | 420 ++++++++++++++++++++++- JDR/src/Presentation/Plateau_de_jeu.java | 344 ++++++++++++++++++- 2 files changed, 758 insertions(+), 6 deletions(-) diff --git a/JDR/src/Presentation/Plateau_de_jeu.form b/JDR/src/Presentation/Plateau_de_jeu.form index 769eecd..5d483b8 100644 --- a/JDR/src/Presentation/Plateau_de_jeu.form +++ b/JDR/src/Presentation/Plateau_de_jeu.form @@ -1,6 +1,33 @@
+ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -23,13 +50,402 @@ - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/JDR/src/Presentation/Plateau_de_jeu.java b/JDR/src/Presentation/Plateau_de_jeu.java index 433ae77..3e0e40c 100644 --- a/JDR/src/Presentation/Plateau_de_jeu.java +++ b/JDR/src/Presentation/Plateau_de_jeu.java @@ -4,17 +4,25 @@ */ package Presentation; +import javax.swing.DefaultComboBoxModel; +import metier.Jeu; +import metier.Personnage; + + /** * * @author emile.lalorcey */ public class Plateau_de_jeu extends javax.swing.JFrame { - /** * Creates new form Plateau_de_jeu */ + Jeu leJeu = new Jeu(); public Plateau_de_jeu() { initComponents(); + jCBoxAttaquant.setModel( new DefaultComboBoxModel(leJeu.getLesPersonnagesVivants())); + jCBoxDefenseur.setModel( new DefaultComboBoxModel(leJeu.getLesPersonnagesVivants())); + majStatistiquesPersos(); } /** @@ -26,22 +34,326 @@ public class Plateau_de_jeu extends javax.swing.JFrame { // //GEN-BEGIN:initComponents private void initComponents() { + jScrollPane1 = new javax.swing.JScrollPane(); + jList1 = new javax.swing.JList<>(); + jPanel1 = new javax.swing.JPanel(); + JPFondListePerso = new javax.swing.JPanel(); + jLImageListePerso = new javax.swing.JLabel(); + jScrollPane2 = new javax.swing.JScrollPane(); + jTextArea1 = new javax.swing.JTextArea(); + jPJeu = new javax.swing.JPanel(); + jLChoixPerso = new javax.swing.JLabel(); + jPChoixPerso = new javax.swing.JPanel(); + jLChoixPersoText = new javax.swing.JLabel(); + jPCHoixPersoFond = new javax.swing.JPanel(); + jCBoxAttaquant = new javax.swing.JComboBox<>(); + jCBoxDefenseur = new javax.swing.JComboBox<>(); + jPAttaquant = new javax.swing.JPanel(); + jLImageAttaquant = new javax.swing.JLabel(); + jScrollPane3 = new javax.swing.JScrollPane(); + jTAAttaquantCaracteristiques = new javax.swing.JTextArea(); + jPDefenseur = new javax.swing.JPanel(); + jLImageDefenseur = new javax.swing.JLabel(); + jScrollPane4 = new javax.swing.JScrollPane(); + jTADefenseurCaracteristiques = new javax.swing.JTextArea(); + jBGo = new javax.swing.JButton(); + + jList1.setModel(new javax.swing.AbstractListModel() { + String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" }; + public int getSize() { return strings.length; } + public String getElementAt(int i) { return strings[i]; } + }); + jScrollPane1.setViewportView(jList1); + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + JPFondListePerso.setBackground(new java.awt.Color(102, 0, 0)); + JPFondListePerso.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + JPFondListePerso.add(jLImageListePerso, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 10, 130, 80)); + + jScrollPane2.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + + jTextArea1.setBackground(new java.awt.Color(102, 0, 0)); + jTextArea1.setColumns(20); + jTextArea1.setRows(5); + jScrollPane2.setViewportView(jTextArea1); + + JPFondListePerso.add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 100, 148, 360)); + + jPJeu.setBackground(new java.awt.Color(255, 255, 255)); + + jLChoixPersoText.setText("Choix Des personnages"); + + jPCHoixPersoFond.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); + + jCBoxAttaquant.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); + jCBoxAttaquant.addInputMethodListener(new java.awt.event.InputMethodListener() { + public void caretPositionChanged(java.awt.event.InputMethodEvent evt) { + } + public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) { + jCBoxAttaquantInputMethodTextChanged(evt); + } + }); + jCBoxAttaquant.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jCBoxAttaquantActionPerformed(evt); + } + }); + + jCBoxDefenseur.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); + jCBoxDefenseur.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jCBoxDefenseurActionPerformed(evt); + } + }); + + jPAttaquant.setBackground(new java.awt.Color(102, 0, 0)); + + jScrollPane3.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + jScrollPane3.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); + + jTAAttaquantCaracteristiques.setColumns(20); + jTAAttaquantCaracteristiques.setRows(5); + jTAAttaquantCaracteristiques.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR)); + jTAAttaquantCaracteristiques.setOpaque(false); + jScrollPane3.setViewportView(jTAAttaquantCaracteristiques); + + javax.swing.GroupLayout jPAttaquantLayout = new javax.swing.GroupLayout(jPAttaquant); + jPAttaquant.setLayout(jPAttaquantLayout); + jPAttaquantLayout.setHorizontalGroup( + jPAttaquantLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPAttaquantLayout.createSequentialGroup() + .addGap(25, 25, 25) + .addComponent(jLImageAttaquant, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(51, Short.MAX_VALUE)) + .addGroup(jPAttaquantLayout.createSequentialGroup() + .addContainerGap() + .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) + .addContainerGap()) + ); + jPAttaquantLayout.setVerticalGroup( + jPAttaquantLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPAttaquantLayout.createSequentialGroup() + .addContainerGap() + .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jLImageAttaquant, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(15, Short.MAX_VALUE)) + ); + + jPDefenseur.setBackground(new java.awt.Color(102, 0, 0)); + + jScrollPane4.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + jScrollPane4.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); + + jTADefenseurCaracteristiques.setColumns(20); + jTADefenseurCaracteristiques.setRows(5); + jScrollPane4.setViewportView(jTADefenseurCaracteristiques); + + javax.swing.GroupLayout jPDefenseurLayout = new javax.swing.GroupLayout(jPDefenseur); + jPDefenseur.setLayout(jPDefenseurLayout); + jPDefenseurLayout.setHorizontalGroup( + jPDefenseurLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPDefenseurLayout.createSequentialGroup() + .addGap(31, 31, 31) + .addComponent(jLImageDefenseur, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(38, Short.MAX_VALUE)) + .addGroup(jPDefenseurLayout.createSequentialGroup() + .addContainerGap() + .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) + .addContainerGap()) + ); + jPDefenseurLayout.setVerticalGroup( + jPDefenseurLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPDefenseurLayout.createSequentialGroup() + .addContainerGap() + .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addComponent(jLImageDefenseur, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + javax.swing.GroupLayout jPCHoixPersoFondLayout = new javax.swing.GroupLayout(jPCHoixPersoFond); + jPCHoixPersoFond.setLayout(jPCHoixPersoFondLayout); + jPCHoixPersoFondLayout.setHorizontalGroup( + jPCHoixPersoFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPCHoixPersoFondLayout.createSequentialGroup() + .addGap(81, 81, 81) + .addComponent(jCBoxAttaquant, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jCBoxDefenseur, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(75, 75, 75)) + .addGroup(jPCHoixPersoFondLayout.createSequentialGroup() + .addGap(27, 27, 27) + .addComponent(jPAttaquant, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 80, Short.MAX_VALUE) + .addComponent(jPDefenseur, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(38, 38, 38)) + ); + jPCHoixPersoFondLayout.setVerticalGroup( + jPCHoixPersoFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPCHoixPersoFondLayout.createSequentialGroup() + .addGap(15, 15, 15) + .addGroup(jPCHoixPersoFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jCBoxAttaquant, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jCBoxDefenseur, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPCHoixPersoFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPAttaquant, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPDefenseur, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap()) + ); + + javax.swing.GroupLayout jPChoixPersoLayout = new javax.swing.GroupLayout(jPChoixPerso); + jPChoixPerso.setLayout(jPChoixPersoLayout); + jPChoixPersoLayout.setHorizontalGroup( + jPChoixPersoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPChoixPersoLayout.createSequentialGroup() + .addGap(26, 26, 26) + .addComponent(jLChoixPersoText, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPChoixPersoLayout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPCHoixPersoFond, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(70, 70, 70)) + ); + jPChoixPersoLayout.setVerticalGroup( + jPChoixPersoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPChoixPersoLayout.createSequentialGroup() + .addGap(22, 22, 22) + .addComponent(jLChoixPersoText) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jPCHoixPersoFond, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + jBGo.setText("Go"); + jBGo.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jBGoActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPJeuLayout = new javax.swing.GroupLayout(jPJeu); + jPJeu.setLayout(jPJeuLayout); + jPJeuLayout.setHorizontalGroup( + jPJeuLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPJeuLayout.createSequentialGroup() + .addContainerGap(15, Short.MAX_VALUE) + .addComponent(jPChoixPerso, javax.swing.GroupLayout.PREFERRED_SIZE, 528, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(54, 54, 54)) + .addGroup(jPJeuLayout.createSequentialGroup() + .addGroup(jPJeuLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPJeuLayout.createSequentialGroup() + .addGap(215, 215, 215) + .addComponent(jLChoixPerso, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPJeuLayout.createSequentialGroup() + .addGap(236, 236, 236) + .addComponent(jBGo))) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + jPJeuLayout.setVerticalGroup( + jPJeuLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPJeuLayout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLChoixPerso, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(32, 32, 32) + .addComponent(jPChoixPerso, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jBGo) + .addGap(5, 5, 5)) + ); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jPJeu, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(JPFondListePerso, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addComponent(JPFondListePerso, javax.swing.GroupLayout.PREFERRED_SIZE, 484, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE)) + .addComponent(jPJeu, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap()) + ); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 400, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 300, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(14, Short.MAX_VALUE)) ); pack(); }// //GEN-END:initComponents + private void jCBoxAttaquantActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCBoxAttaquantActionPerformed + // TODO add your handling code here: + String perso = (String) jCBoxAttaquant.getSelectedItem(); + String nomPerso = perso.split(":")[1]; + Personnage Perso = leJeu.rechercherPerso(nomPerso); + jTAAttaquantCaracteristiques.setText(Perso.toString()); + }//GEN-LAST:event_jCBoxAttaquantActionPerformed + + private void jCBoxAttaquantInputMethodTextChanged(java.awt.event.InputMethodEvent evt) {//GEN-FIRST:event_jCBoxAttaquantInputMethodTextChanged + + }//GEN-LAST:event_jCBoxAttaquantInputMethodTextChanged + + + private void jCBoxDefenseurActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCBoxDefenseurActionPerformed + // TODO add your handling code here: + String perso = (String) jCBoxDefenseur.getSelectedItem(); + String nomPerso = perso.split(":")[1]; + Personnage Perso = leJeu.rechercherPerso(nomPerso); + jTADefenseurCaracteristiques.setText(Perso.toString()); + }//GEN-LAST:event_jCBoxDefenseurActionPerformed + + + private void jBGoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBGoActionPerformed + //Attaquant + String attaque = (String) jCBoxAttaquant.getSelectedItem(); + String nomAttaque = attaque.split(":")[1]; + Personnage attaquant = leJeu.rechercherPerso(nomAttaque); + //Defenseur + String defense = (String) jCBoxAttaquant.getSelectedItem(); + String nomDefense = defense.split(":")[1]; + Personnage defenseur = leJeu.rechercherPerso(nomDefense); + //Combat + attaquant.rencontrer(defenseur); + //mise à jour ath + majStatistiquesPersos(); + }//GEN-LAST:event_jBGoActionPerformed + + private void majStatistiquesPersos(){ + String persos = "Jeu : "+leJeu.getnomJeu(); + for(Personnage Perso:leJeu.getmesPersonnages()){ + persos += "\n"; + persos += Perso; + persos += "\n"; + persos += "----------------"; + } + jTextArea1.setText(persos); + } /** * @param args the command line arguments */ @@ -76,7 +388,31 @@ public class Plateau_de_jeu extends javax.swing.JFrame { } }); } - + //Déclaration variables + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JPanel JPFondListePerso; + private javax.swing.JButton jBGo; + private javax.swing.JComboBox jCBoxAttaquant; + private javax.swing.JComboBox jCBoxDefenseur; + private javax.swing.JLabel jLChoixPerso; + private javax.swing.JLabel jLChoixPersoText; + private javax.swing.JLabel jLImageAttaquant; + private javax.swing.JLabel jLImageDefenseur; + private javax.swing.JLabel jLImageListePerso; + private javax.swing.JList jList1; + private javax.swing.JPanel jPAttaquant; + private javax.swing.JPanel jPCHoixPersoFond; + private javax.swing.JPanel jPChoixPerso; + private javax.swing.JPanel jPDefenseur; + private javax.swing.JPanel jPJeu; + private javax.swing.JPanel jPanel1; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JScrollPane jScrollPane2; + private javax.swing.JScrollPane jScrollPane3; + private javax.swing.JScrollPane jScrollPane4; + private javax.swing.JTextArea jTAAttaquantCaracteristiques; + private javax.swing.JTextArea jTADefenseurCaracteristiques; + private javax.swing.JTextArea jTextArea1; // End of variables declaration//GEN-END:variables }