当前位置: 代码迷 >> Java相关 >> applet的打印(求助)
  详细解决方案

applet的打印(求助)

热度:306   发布时间:2005-09-20 23:29:00.0
applet的打印(求助)

import java.awt.Graphics; import javax.swing.JApplet; public class CoutnPf extends JApplet{ int i = 0,square = 0,cube = 0; int y = 25;

public void paint(Graphics g) { super.paint(g); g.drawString("number\tsquare\tcube",25,y); for( ; i <= 10 ; i++) { g.drawString(i + square + cube ,25,y); y = y + 20; square = pow(i,2); cube = square * i; } } }

[此贴子已经被作者于2005-9-21 10:47:19编辑过]

搜索更多相关的解决方案: applet  打印  

----------------解决方案--------------------------------------------------------

----------------解决方案--------------------------------------------------------