1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
public class FrameMesure extends JFrame {
private static final long serialVersionUID = 1L;
public FrameMesure(Pourcentage pct){
super("Suivi d'une mesure");
setLayout( null );
setSize(750,700);
setLocationRelativeTo(null);
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
JLabel label1 = new JLabel( "Résultat" );
label1.setBounds( 350, 25, 150, 20 );
add( label1 );
//affichage
JTable table = new JTable(13,2);
table.setEnabled(false);
table.setValueAt("Début: ",0,0);
table.setValueAt("Fin: ",1,0);
table.setValueAt("Equipe:",2,0);
table.setValueAt("Opérateur: ",3,0);
table.setValueAt("Nombre de passage: ",4,0);
table.setValueAt("Test: ",5,0);
table.setValueAt("Type Véhicule", 6, 0);
table.setValueAt("Résultats: ",7,0);
table.setValueAt("Valeur MIN",8,0);
table.setValueAt("Valeur MAX",9,0);
table.setValueAt("Taux Bon Direct",10,0);
table.setValueAt("Nombre total de véhicule dans la sélection", 11,0);
table.setValueAt("Nombre de véhicule mauvais dans la sélection", 12, 0);
table.setValueAt(pct.getDatedebut(),0,1);
table.setValueAt(pct.getDatefin(),1,1);
table.setValueAt(pct.getEquipe(),2,1);
table.setValueAt(pct.getOperateur(),3,1);
//table.setValueAt(valeurs[4],4,1);
table.setValueAt(pct.getTest(),5,1);
table.setValueAt(pct.getSilhouette(),6,1);
//table.setValueAt(valeurs[7],7,1);
table.setValueAt(pct.getMin(),8,1);
table.setValueAt(pct.getMax(),9,1);
table.setValueAt(pct.getBon(),10,1);
table.setValueAt(pct.getNbtotal(),11,1);
table.setValueAt(pct.getNbmauvais(),12,1);
table.setBounds(12,50, 725,210);
add(table);
JTable table2 = new JTable(pct.taille(),3);
for (int i= 0; i<pct.taille();i++){
table2.setValueAt(pct.getListeVehicule().get(i).getDate(), i, 0);
}
for (int i= 0; i<pct.taille();i++){
table2.setValueAt(pct.getListeVehicule().get(i).getId(), i, 1);
}
for (int i= 0; i<pct.taille();i++){
table2.setValueAt(pct.getListeVehicule().get(i).getRes(), i, 2);
}
table2.setBounds(12, 300, 725, (pct.taille())*20);
table2.setEnabled(false);
add(table2);
JButton bouton = new JButton("Fermer");
bouton.setBounds(350, 650, 75, 20);
add(bouton);
bouton.addActionListener( new ActionListener(){
public void actionPerformed(ActionEvent ae){
dispose();
}
}
);
add(bouton);
setVisible(true);
}
} |
Partager