/*qywjs.java*/
import java.awt.*;
import java.net.*;
import java.io.*;
public class qywjs extends java.applet.Applet
{
Font fn=new Font("TimesRoman",Font.BOLD,14);
/*设置显示字体及大小*/
String count_str; /*存计数器的值*/
public void init() /*初始*/
{
try
{
URL bookURL=new URL
("
@h:\\www\\qywjs\\qywjs.PRG"); /*调入CGI程序*/
DataInputStream book_is;
book_is=new DataInputStream(bookURL.openStream());
count_str=book_is.readLine(); /*读入计数值*/
book_is.close();
repaint();
}
catch (MalformedURLException mfURLe)
{System.out.println("MalformedURLException:"+mfURLe);}
catch (IOException ioe)
{System.out.println("IOException:"+ioe);}
}
public void paint(Graphics g) /*显示*/
{g.setFont(fn);
g.setColor(Color.blue);
g.drawString("从2007年06月05日开始,
你是第 "+count_str+" 位用户光临!",16,16);
}
}
--------------------next---------------------
阅读(357) | 评论(0) | 转发(0) |