🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: ������һ���ѿ������ߣ���ô��ʾһ����棡

#21550
From: ¯��
Date: Thu, 27 Nov 2003 02:40
66 lines
2762 bytes
 public void init() {
    setBackground(Color.black);
    AppletWidth=getSize().width;
    AppletWidth=getSize().height;------��һ�£��պ�
    offScreen=createImage(AppletWidth,AppletHeight);
    drawOffScreen=offScreen.getGraphics();
  }     


�� �� huabow.bbs@bbs.sjtu.edu.cn (���԰׳�) �Ĵ������ᵽ: ��
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]


--
�Ҷ���   �q�ɨr�����㣩�q�ɨr
�� ��Դ:���Ұ��Ͽ�վ bbs.nankai.edu.cn��[FROM: 202.113.227.189] 
Technical Details
Message-ID: <49QEVg$ASJ@bbs.nankai.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.happynet.org!NanKai

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f6cb0,168d5bfee3872547
X-Google-Attributes: gidf6cb0,public
X-Google-ArrivalTime: 2003-11-26 18:41:21 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.happynet.org!NanKai
From: holyelle.bbs@bbs.nankai.edu.cn (¯��)
Newsgroups: cn.bbs.comp.lang.java
Subject: Re: ������һ���ѿ������ߣ���ô��ʾһ����棡
Date: 27 Nov 2003 02:40:18 GMT
Organization: �Ұ��Ͽ�վ
Message-ID: <49QEVg$ASJ@bbs.nankai.edu.cn>
X-Filename: Java/M.1069900794.A
Lines: 66