si scusa ti avevo postato il vecchio codice:
import java.io.*;
import java.net.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class lol {
static JFrame j = new JFrame();
public static void main( String arg[] )
{
j.setTitle("Xyz");
j.setBounds(10,10,300,200);
j.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
j.setVisible(true);
j.getContentPane().add(label);
tCounter myCounter = new tCounter();
myCounter.run();
}
class tCounter extends Thread {
label = new JLabel();
public int count = 1;
public void run() {
while (count < 50) {
try {
sleep(1000);
} catch (InterruptedException e) { }
label.setText(String.valueOf(count));
count++;
}
}
}
}
questo è quello modificato completo ma da lo stesso errore