import java.awt.*;
import java.applet.Applet;
import java.awt.event.*;
import java.awt.Color;
public class Rosel extends Applet implements ItemListener{
Color color=Color.black;
CheckboxGroup cg1;
Checkbox cb1,cb2,cb3;
public viod init() {
set Background(Color.white);
setLayout (new FlowLayout());
cg1=new CheckboxGround();
cb1=new Checkbox("bule",cg1,true);
cb2=new Checkbox("red",cg1,false);
cb3=new Checkbox("green",cg1,false);
cb1.addItemListener(this);
cb2.addItemListener(this);
cb3.addItemListener(this);
add(cb1);add(cb2);add(cb3); }
public void paint (Graphics g){
int x0,y0,w1,h1;
w1=600;
h1=300;
x0=w1/2;
y0=h1/2;
g.setColor(color);
g.drawLine(x0,10,y0,h1);
g.drawLine(0,y0,w1,y0);
int i,j=40,x,y;
double pi=3.14,angle,r;
while(j<200) {
for(i=0;i<1023;i++) {
angle=i*pi/512;
r=j*Math.sin(2*angle);
x=(int)Math,round(t*Math.cos(angle)*2);
y=(int)Math.round.sin(angle);
g.fillOval(x0+x,y0+y,1,1); }
j=j+20; }
new Rosel().setVisible(true);}
public void itemStateChanged(ItemEvent e){
if(e.getSource()==cb1)
color=Color.bule;
if(cb2.getState())
color=Color.red;
if(cg1.getStatedCheckbox()==cb3)
color=Color.green;
repaint(); }
}
C:\>Javac Rosel.java
Rosel.java:11: 需要 ';'
set Background(Color.white);
^
Rosel.java:11: 不是语句
set Background(Color.white);
^
Rosel.java:11: 需要 ';'
set Background(Color.white);
^
3 错误
哪里错了 ?求高手啊!!