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
| private void TxtNumRegistreKeyReleased(java.awt.event.KeyEvent evt) {
// TODO add your handling code here:
String val1="0000";String val2="000";String val3="00";String val4="0";
int Contval1=Integer.parseInt(val1);
int Contval2=Integer.parseInt(val2);
int Contval3=Integer.parseInt(val3);
int Contval4=Integer.parseInt(val4);
int Varval1,Varval2,Varval3,Varval4;
int valeur=getTxtNumRegistre();
if(getTxtNumRegistre()<10)
// Varval1= Contval1 + Integer.parseInt(TxtNumRegistre.getText());
// setTxtNumRegistre(Varval1);
TxtNumRegistre.setText("000"+getTxtNumRegistre());
else if(getTxtNumRegistre()<100)
//Varval2= Contval2 + Integer.parseInt(TxtNumRegistre.getText());
TxtNumRegistre.setText("000"+getTxtNumRegistre());
else if(getTxtNumRegistre()<1000)
//Varval3= Contval3 + Integer.parseInt(TxtNumRegistre.getText());
TxtNumRegistre.setText("00"+getTxtNumRegistre());
else if(getTxtNumRegistre()<10000)
TxtNumRegistre.setText("0"+getTxtNumRegistre());
// Varval4= Contval4 + Integer.parseInt(TxtNumRegistre.getText());
} |
Partager