Transférer les fichiers vers 'src/Test'
This commit is contained in:
parent
f956c07bef
commit
e3c2a96428
@ -55,6 +55,7 @@ public class Controller implements ActionListener, ListSelectionListener {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Pour afficher une JTable sans listener
|
||||
*
|
||||
@ -286,7 +287,7 @@ public class Controller implements ActionListener, ListSelectionListener {
|
||||
}
|
||||
|
||||
else if(Objects.equals(command, "av::AddStudGrup")) {
|
||||
Object[][] data = new Object[this.e.size()][3];
|
||||
ArrayList<ArrayList<String>> data = new ArrayList();
|
||||
|
||||
String[] titre = {
|
||||
"Nom",
|
||||
@ -295,27 +296,30 @@ public class Controller implements ActionListener, ListSelectionListener {
|
||||
"Action"
|
||||
};
|
||||
|
||||
for(int i = 0; i <= this.e.size()-1; i++) {
|
||||
if(this.e.get(i).getGroupe() == -1) {
|
||||
Object[] info = {
|
||||
this.e.get(i).getNom(),
|
||||
this.e.get(i).getPrenom(),
|
||||
String.valueOf(this.e.get(i).getGroupe()),
|
||||
"[AJOUTER]"
|
||||
};
|
||||
int i, j;
|
||||
|
||||
data[i] = info;
|
||||
for(i = 0; i <= this.e.size()-1; i++) {
|
||||
if(this.e.get(i).getGroupe() == -1) {
|
||||
ArrayList<String> info = new ArrayList<>();
|
||||
info.add(this.e.get(i).getNom());
|
||||
info.add(this.e.get(i).getNom());
|
||||
info.add(String.valueOf(this.e.get(i).getGroupe()));
|
||||
info.add("[AJOUTER]");
|
||||
|
||||
data.add(info);
|
||||
}
|
||||
}
|
||||
|
||||
String[][] stringArray = data.stream().map(u -> u.toArray(new String[0])).toArray(String[][]::new);
|
||||
|
||||
DisplayWithListner(
|
||||
this.av,
|
||||
"Attriuer un groupe a un etudiant",
|
||||
"Attribuer un groupe a un etudiant",
|
||||
350,
|
||||
400,
|
||||
this.av.getX(),
|
||||
this.av.getY(),
|
||||
this.createJTable(data, titre)
|
||||
this.createJTable(stringArray, titre)
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user