Like a slot machine how can I see the movement of numbers and will stop 1 by 1..anyone know how to do it?
import java.awt.*;
import java.applet.*;
import java.lang.*;
public class Lotto1 extends Applet {
public int n1,n2,n3,n4,n5,n6;
void button1_Clicked(Event event) {
n1=(int)(53*Math.random()+1);
n2=(int)(53*Math.random()+1);
n3=(int)(53*Math.random()+1);
n4=(int)(53*Math.random()+1);
n5=(int)(53*Math.random()+1);
n6=(int)(53*Math.random()+1);
textField1.setText(Integer.toString(n1));
textField2.setText(Integer.toString(n2));
textField3.setText(Integer.toString(n3));
textField4.setText(Integer.toString(n4));
textField5.setText(Integer.toString(n5));
textField6.setText(Integer.toString(n6));
}
void button2_Clicked(Event event) {
// to do: place event handler code here.
destroy();
}
public void init() {
super.init();
//{{INIT_CONTROLS
setLayout(null);
addNotify();
resize(528,266);
setBackground(new Color(16756655));
button1 = new java.awt.Button("Lotto");
button1.reshape(48,132,84,40);
add(button1);
textField1 = new java.awt.TextField();
textField1.reshape(24,24,61,49);
add(textField1);
textField2 = new java.awt.TextField();
textField2.reshape(108,24,58,49);
add(textField2);
textField3 = new java.awt.TextField();
textField3.reshape(192,24,58,49);
add(textField3);
textField4 = new java.awt.TextField();
textField4.reshape(276,24,58,49);
add(textField4);
textField5 = new java.awt.TextField();
textField5.reshape(360,24,58,49);
add(textField5);
textField6 = new java.awt.TextField();
textField6.reshape(444,24,58,49);
add(textField6);
nervousText1 = new symantec.itools.multimedia.NervousText();
nervousText1.reshape(192,132,264,60);
nervousText1.setFont(new Font("TimesRoman", Font.BOLD, 20));
add(nervousText1);
nervousText1.setText("Lotto Picker");
//}}
}
public boolean handleEvent(Event event) {
if (event.target == button1 && event.id == Event.ACTION_EVENT) {
button1_Clicked(event);
}
return super.handleEvent(event);
}
//{{DECLARE_CONTROLS
java.awt.Button button1;
java.awt.TextField textField1;
java.awt.TextField textField2;
java.awt.TextField textField3;
java.awt.TextField textField4;
java.awt.TextField textField5;
java.awt.TextField textField6;
symantec.itools.multimedia.NervousText nervousText1;
//}}
}