POssibiliter Grupe: Renomer, supprimer, créer, ajouter des Etudiant

This commit is contained in:
2022-11-13 19:50:53 +01:00
parent e9fac29412
commit 323c6e43e2
13 changed files with 355 additions and 14 deletions

View File

@@ -0,0 +1,41 @@
package fr.iutfbleau.projetIHM2022FI2.Graphic.View;
import javax.swing.JLabel;
import javax.swing.JPanel;
import fr.iutfbleau.projetIHM2022FI2.API.Etudiant;
import javax.swing.JButton;
import java.awt.*;
public class PanelEtudiant extends JPanel{
private JLabel nom;
private Etudiant e;
private JButton renomer;
private JButton supprimer;
private JButton deplacer;
public PanelEtudiant(Etudiant e){
super(new GridBagLayout());
this.nom=new JLabel(e.getNom()+" "+e.getPrenom()+" "+e.getId(), JLabel.LEFT);
this.renomer=new JButton("r");
this.supprimer=new JButton("-");
this.deplacer=new JButton("c");
GridBagConstraints cbg=new GridBagConstraints();
cbg.gridy=0;
cbg.anchor=GridBagConstraints.EAST;
cbg.fill=GridBagConstraints.BOTH;
this.add(this.nom, cbg);
cbg.gridwidth=0;
cbg.gridheight=0;
cbg.anchor=GridBagConstraints.EAST;
cbg.fill=GridBagConstraints.NONE;
this.add(this.renomer, cbg);
this.add(this.supprimer, cbg);
this.add(this.deplacer, cbg);
}
}