import java.applet.Applet;
public class HelloApplet extends Applet {
java.awt.Label label = new java.awt.Label ();
private static final long serialVersionUID = 1L;
/**
* This is the default constructor
*/
public HelloApplet() {
super();
}
/**
* This method initializes this
*
* @return void
*/
public void init() {
try {
jbInit();
}catch(Exception e){
e.printStackTrace(); }
}
private void jbInit () throws Exception{
label.setFont("Dialog",Font.BLOG,25);
label.setText("欢迎学习JAVAAPPLET");
this.add(label);
}
}
帮忙修改下