wieso funktioniert Thread.sleep(); unter win2k nicht?
unter win98 und me ist das kein problem, ebenso unter mac os. nur unter win2k geht es nicht und wird einfach ignoriert.

wieso funktioniert Thread.sleep(); unter win2k nicht?
unter win98 und me ist das kein problem, ebenso unter mac os. nur unter win2k geht es nicht und wird einfach ignoriert.
es ist nur eine kleine java-übung, hier der ganze quelltext:
import java.awt.*;
import java.awt.event.*;
import java.applet.Applet;
public class TrivialApplet extends Applet
{
public void init() {
repaint();
}
public void paint( Graphics g ) {
try {
Thread.sleep(2000);
g.drawLine(20,20,100,20);
Thread.sleep(5000);
g.drawLine(20,40,100,40);
}
catch (InterruptedException e){
System.out.println("Geht jetzt nicht...");
}
}
}
schon mal danke im voraus!