Normal
[code=Java]class Spielfenster extends JPanel implements Runnable{ private static final long serialVersionUID = 1L; JFrame frame; long fps = 0; Runnable run; Thread th=new Thread(this); th.start(); int zaehler=1; int zaehler1=1; public void run() { while(zaehler<=5) { ++zaehler; try { Thread.sleep(999); } catch (Exception ex) { System.out.println("FEHLER!!!"); } System.out.println("ALLES OK."); } }}[/code]das programm sollte jede sekunde alles ok schreiben ,und [code]Runnable run ;[/code] hat eclipse mir gesagt
[code=Java]
class Spielfenster extends JPanel implements Runnable{
private static final long serialVersionUID = 1L;
JFrame frame;
long fps = 0;
Runnable run;
Thread th=new Thread(this);
th.start();
int zaehler=1;
int zaehler1=1;
public void run()
{
while(zaehler<=5)
++zaehler;
try
Thread.sleep(999);
}
catch (Exception ex)
System.out.println("FEHLER!!!");
System.out.println("ALLES OK.");
[/code]
das programm sollte jede sekunde alles ok schreiben ,und [code]Runnable run ;[/code] hat eclipse mir gesagt