i am pretty new to java i wrote this code but setText doesnt work i mean i cant reset the contol after type a value .what is wrong friends
[CODE]
private void jTextField1KeyReleased(java.awt.event.KeyEvent evt) {
String gelen=jTextField1.getText();
Random rnd=new Random();
int secilen=new Integer(rnd.nextInt(3));
if(Integer.parseInt(gelen)>secilen){
jOptionPane2.setBackground(Color.GREEN);
jOptionPane2.setMessage("Girdiğiniz sayı "+gelen
+"\n Benim tututuğmdan büyük "+secilen);
jOptionPane2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resim/tux.png")));
}else if(Integer.parseInt(gelen)<secilen){
jOptionPane2.setBackground(Color.blue);
jOptionPane2.setMessage("Girdiğiniz sayı "+gelen
+"\n Benim tututuğmdan küçük "+secilen);
jOptionPane2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resim/tux.png")));
}
else if(Integer.parseInt(gelen)==secilen){
jOptionPane2.setBackground(Color.red);
jOptionPane2.setMessage("Tebirkler ");
jOptionPane2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resim/tux.png")));
**jTextField1.setText("");**
}
}
[/CODE]