初学java,怎么也搞不懂为什么编译不通过,能说明理由吗?谢谢拉!
import java.awt.*;
import javax.swing.JApplet;
public class Stringtest extends JApplet{
int x1,y1;
String fsize;
String fname;
String fstyle;
String fcolor;
public void start(){
String param;
x1=Integer.parseInt(getParameter("x1"));
y1=Integer.parseInt(getParameter("y1"));
fsize=getParameter("fsize");
if(fsize==null)fsize="Not found";
/*try{if(param!=null)
fsize=Integer.parseInt(param);
else
fsize=0;
}catch(NumberFormatException e){
fsize=-1;
}*/
fname=getParameter("fname");
if(fname==null)fname="Not found";
fstyle=getParameter("fstyle");
if(fstyle==null)fstyle="Not found";
fcolor=getParameter("fcolor");
if(fcolor==null)fcolor="Not found";
}
public void paint(Graphics g){
g.setColor(Color.fcolor);
g.setFont(new Font(fname,fstyle,fsize));
g.drawString("This is String test!",x1,y1);
}
}