怎么这个在html里输出,没过多久显示就没了?
import java.awt.Graphics; import javax.swing.JApplet; import java.lang.Math; public class CoutnPf extends JApplet{ double i = 0,square = 0,cube = 0; double y = 25;
public void paint(Graphics g) { super.paint(g); g.drawString("number square cube",25,(int)y); for( ; i <= 10 ; i++) { square = Math.pow(i,2.0); cube = Math.pow(i,3.0); g.drawString( i + " " + square + " " + cube ,25,(int)y); y = y + 20; } } }