This commit is contained in:
2022-11-17 13:13:43 +01:00
parent 6c05981b8d
commit c5cf0dd4f4
12 changed files with 201 additions and 40 deletions

View File

@@ -7,21 +7,28 @@ import fr.iutfbleau.projetIHM2022FI2.API.Etudiant;
import javax.swing.JButton;
import java.awt.*;
import java.awt.event.ActionListener;
public class PanelEtudiant extends JPanel{
private Etudiant e;
private JButton supprimer;
private JButton deplacer;
public PanelEtudiant(Etudiant e){
super(new GridLayout(1,2,20,10));
this.e=e;
JLabel label=new JLabel(" "+e.getNom()+" "+e.getPrenom()+" "+e.getId(), JLabel.LEFT);
this.supprimer=new JButton("supr");
this.deplacer=new JButton("change");
this.add(label);
JPanel bouton=new JPanel(new GridLayout(1,2));
bouton.add(this.supprimer);
bouton.add(this.deplacer);
this.add(bouton);
}
public void addActionDeleteListener(ActionListener a){
this.supprimer.addActionListener(a);
}
public void addActionChangeListener(ActionListener a){
this.deplacer.addActionListener(a);
}
}