import java.awt.*;
import java.applet.*;
public class Circle implements Runnable {
Thread t;
//stuff
public Circle()
{
t = new Thread (this);
t.start();
}
public void run()
{
try {
while (true) {
repaint();
t.sleep( 1000 );
}
}
catch (InterruptedException e) { }
}
public void paint( Graphics g )
{
//stuff
}
}
That's some of my code so far, but it keeps saying "The method repaint() is undefined for the type Enemy"
I've tried java.applet.Applet.repaint(); and about a hundred other things, but I can't get anything to work
Another error that i get is "Cannot make a static reference to the non-static method repaint() from the type Component"
I've used threads maybe once or twice before, but just to create simple animations.
needless to say I'm not that experienced with programming yet...
If anybody could help me I'd greatly appreciate it.