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
|
public void TexC11(){
connexion.executeSQL("SELECT COUNT(Groupe) AS Nb_Groupe FROM Ec_Taches_en_cours WHERE Groupe = ( SELECT Ligne1 FROM Noms_Lignes WHERE Ligne10 = 'Rien_Ligne_Tableau_Bord' )");
try{
connexion.resultset.first();
Tablea.jtext1_table_vil.setText(connexion.resultset.getString("Nb_Groupe"));
int text11 = Integer.parseInt(Tablea.jtext1_table_vil.getText());
try{
if (( text11 == 0) )
Tablea.jtext1_table_vil.setBackground(new Color( 255,255,255));
else if(( text11 <= 3) && (text11 < 5) )
Tablea.jtext1_table_vil.setBackground(new Color(255,255,0));
else if( text11 >= 5)
Tablea.jtext1_table_vil.setBackground(new Color(0,255,0));
else if ( text11 < 0)
Tablea.jtext1_table_vil.setBackground(new Color(255,0,0));
}
catch( Exception e)
{
}
Tablea.jtext1_table_vil.setEditable(false);
}
catch(SQLException error)
{
JOptionPane.showMessageDialog(null," erreur de lecture sur champs "+ error);
}
} |
Partager