这是怎么回事a
import java.awt.*;import java.applet.*;
public class GraphicsPrime extends Applet implements ActionListener {
Label prompt;
TextField input;
public void init(){
prompt = new Label("Enter a year:");
input = new TextField(3);
input.addActionListener(this);
add(prompt);add(input);
}
public void paint(Graphics g){
int year;
boolean leap;
year = Integer.parseInt(input.getText());
if(year%100==0)
if(year%400==0)leap=ture;
else leap=ture;
else
if(year%4==0)
leap=ture;
else
leap=false;
if(leap)
g.drawString("The is a leap year.",60,80);
else
g.drawString("The is not a leap year.",60,80);
}
public void actionPerformed(ActionEvent e){
repaint();
}
}
我怎么也搞不清楚里面的错误啊,请各位看看哪错了