🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.lang.java
Article #21541

������һ���ѿ������ߣ���ô��ʾһ����棡

#21541
From: ���԰׳�
Date: Wed, 26 Nov 2003 13:55
51 lines
2308 bytes
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class Heart extends Applet {
  int AppletWidth,AppletHeight;
  Image offScreen;
  Graphics drawOffScreen;
  //Initialize the applet
  public void init() {
    setBackground(Color.black);
    AppletWidth=getSize().width;
    AppletWidth=getSize().height;
    offScreen=createImage(AppletWidth,AppletHeight);
    drawOffScreen=offScreen.getGraphics();
  }
 public void paint(Graphics g){
   drawOffScreen.clearRect(0,0,AppletWidth,AppletHeight);
   drawOffScreen.setColor(Color.white);
   int i,j;
   double x,y,r;
   for(i=0;i<=90;i++)
     for(j=0;j<=90;j++){
       r=Math.PI/45*i*(1-Math.sin(Math.PI/45*j))*18;
       x=r*Math.cos(Math.PI/45*j)*Math.sin(Math.PI/45*i)+AppletWidth/2;
       y=-r*Math.sin(Math.PI/45*j)+AppletHeight/4;
       drawOffScreen.fillOval((int)x,(int)y,2,2);
     }
   g.drawImage(offScreen,0,0,this);
 }
}
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>
�ѿ�������
</title>
</head>
<body>
<applet  code= "Heart.class"  width= "400"  height= "350">
</applet>
</body>
</html>

--
���о����ĵ��ı�����ɢ��
�������������
�����������޿ɱ����׹��
ҹ�������������
����
һ�����Ʒ���š�-
�� ��Դ:����ˮ˼Դ bbs.sjtu.edu.cn��[FROM: 211.80.45.144]
Technical Details
Message-ID: <49PgZ6$AeM@bbs.sjtu.edu.cn>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!news-xfer2.atl.newshosting.com!167.206.3.103.MISMATCH!news3.optonline.net!maily.cic.tsinghua.edu.cn!news.ccie.net.cn!SJTU

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,GB
X-Google-Thread: f6cb0,4c4710445dcc0f6b,start
X-Google-Attributes: gidf6cb0,public
X-Google-ArrivalTime: 2003-11-26 05:56:04 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!news-xfer2.atl.newshosting.com!167.206.3.103.MISMATCH!news3.optonline.net!maily.cic.tsinghua.edu.cn!news.ccie.net.cn!SJTU
From: huabow.bbs@bbs.sjtu.edu.cn (���԰׳�)
Newsgroups: cn.bbs.comp.lang.java
Subject: ������һ���ѿ������ߣ���ô��ʾһ����棡
Date: 26 Nov 2003 13:55:38 GMT
Organization: ��ˮ˼Դ
Message-ID: <49PgZ6$AeM@bbs.sjtu.edu.cn>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: Java/M.1069854870.A