下载此文档

万年历Java代码[1].doc


文档分类:IT计算机 | 页数:约8页 举报非法文档有奖
1/8
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/8 下载此文档
文档列表 文档介绍
import .*;
import .*;
import .*;
import .*;
class Calendar extends Panel implements Runnable
{
Button nextYear,nextMonth,nextDate,lastYear,lastMonth,lastDate;
TextField year,month,date;
AudioClip audioClip;
Thread clock;
Date today;
String[] weekName={"日","一","二","三","四","五","六"};
String[] monthName={"一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"};
int[] weekColor={0xff0000, 77ee, 77ee, 77ee, 77ee, 77ee, 0x7795c};
Calendar(AudioClip au)
{
today=new Date();
setLayout(new FlowLayout(,3,13));
add(lastYear=new Button("-"));
add(year=new TextField ((1900+()),2));
add(nextYear=new Button("+"));
add(lastMonth=new Button("-"));
add(month=new TextField((()+1),1));
add(nextMonth=new Button("+"));
add(lastDate=new Button("-"));
add(date=new TextField((()),1));
add(nextDate=new Button("+"));
audioClip=au;
}
public void run()
{
long start=();
do
{
repaint();
start+=1000;
try
{
((0,start-()));
}
catch(InterruptedException e){}
}while(true);
}
public void paint(Graphics g)
{
update(g);
}
public void update(Graphics g)
{
Dimension dimension=size();
Image image=createImage(dimensi

万年历Java代码[1] 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数8
  • 收藏数0 收藏
  • 顶次数0
  • 上传人miao19720107
  • 文件大小39 KB
  • 时间2018-09-24