I have form and that have a label I would when I run the program my counter count in label
but when i run that's nothing open the form and nothing and that's my cod where error
private static int totalNum = 0;
private void formWindowActivated(java.awt.event.WindowEvent evt) {
class Counter extends Thread {
private int currentNum, loopLimit;
public Counter(int loopLimit) {
this.loopLimit = loopLimit;
currentNum = totalNum++;
}
private void pause(double seconds) {
try { Thread.sleep(Math.round(1000.0*seconds)); }
catch(InterruptedException ie) {}
}
public void run() {
for(int i=0; i<loopLimit; i++) {
jLabel1.setText(String.valueOf(currentNum)+String.valueOf(i) );
pause(Math.random());
}
}}