import java.awt.*;
import javax.swing.*;
public class The extends JFrame implements Runnable{
Thread t;
Graphics h;
The(){
super("graphics");
this.setSize(400,400);
this.setVisible(true);
t=new Thread(this);}
public void paint(Graphics g){
h=g;
g.setColor(Color.blue);
t.start();
for(int i=0;i<350;i++){
g.drawOval(i,200,50,50);
}
//f();//......(*)
}
void f(){
for(int i=0;i<350;i++){
h.drawOval(i,50,50,50);
}
}
public void run(){
f();//......(**)
}public static void main(String s[]){
new  The();
}
}
//(*)行注释掉有时显示两条带,有时异常,
//(**)行注释掉只能显示一条,有时异常
WHY?