ajout tous les étudiant et correction bug
This commit is contained in:
@@ -9,33 +9,19 @@ 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);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user