repartition ROOT, ETU et utilisation de l'API respecter, correction de bug et ajout fonction visite de groupe d'un etudiant seulement ceux que il connait
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package fr.iutfbleau.projetIHM2022FI2.ROOT.View;
|
||||
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
import fr.iutfbleau.projetIHM2022FI2.API.Etudiant;
|
||||
|
||||
import javax.swing.JButton;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionListener;
|
||||
public class PanelEtudiant extends JPanel{
|
||||
private JButton supprimer;
|
||||
private JButton deplacer;
|
||||
public PanelEtudiant(Etudiant e){
|
||||
super(new GridLayout(1,2,20,10));
|
||||
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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user