第一范文网 - 专业文章范例文档资料分享平台

Java课程设计实验报告及全部源码流程图

来源:用户分享 时间:2025/5/22 9:12:36 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

}

public static String getchina(int day){ String a = \ if(day==10) return \初十\

int two = (int)((day)/10); if(two==0) a = \初\ if(two==1) a = \十\ if(two==2) a = \廿\ //if(two==2) // a = \卅\

int one = (int)(day); switch(one){

case 1:a += \一\ case 2:a += \二\ case 3:a += \三\ case 4:a += \四\ case 5:a += \五\ case 6:a += \六\ case 7:a += \七\ case 8:a += \八\ case 9:a += \九\ }

return a; } //

y

m

d

历.year0 .month1 .day2 .yearCyl3 .monCyl4 .dayCyl5 .isLeap6

public static String shower() { String b=\

ACalendar Calend =new ACalendar(); //int year = Calend.getYear(); //int month = Calend.getMonth()+1; //int day = Calend.getDay();

int year=Integer.parseInt(ACalendar.strbuttonyear); int month=Integer.parseInt(ACalendar.strbuttonmonth); int day=Integer.parseInt(ACalendar.strbuttonday)+1; String week = \

long[] l = calElement(year,month,day); switch(Calend.getWeek()){ case 1:week = \日\ case 2:week = \一\ case 3:week = \二\ case 4:week = \三\ case 5:week = \四\ case 6:week = \五\ case 7:week = \六\ }

String n = \

switch((int)(l[1])){ case 1:n=\一\ case 2:n=\二\ case 3:n=\三\ case 4:n=\四\ case 5:n=\五\ case 6:n=\六\ case 7:n=\七\ case 8:n=\八\ case 9:n=\九\ case 10:n=\十\ case 11:n=\十一\ case 12:n=\十二\ } try {

b =\农历\月\ BufferedWriter

outout = new BufferedWriter(new

FileWriter(\

outout.close();

} catch (Exception e) {e.printStackTrace();}

return b; } }

这里主要是用来公历与农历相匹配,以便在给定的一天能够显示出相应的农历日期。

PoliceListen.java //日历的按钮鼠标监听 import java.awt.event.*;

public class PoliceListen implements MouseListener { public static int x,y;

public void mousePressed(MouseEvent e) { }

public void mouseReleased(MouseEvent e) { }

public void mouseEntered(MouseEvent e) { }

public void mouseExited(MouseEvent e) { }

public void mouseClicked(MouseEvent e) {

if(e.getClickCount()>=1&&MyWindowListener.mark==0){ } }

public void second(){ Test win2=new Test(); MyWindowListener.mark++; } }

这里主要是用来给日历上相应的按钮加监听,使点击弹出备忘记事的窗口。

x=e.getX();

y=e.getY(); second();

Java课程设计实验报告及全部源码流程图.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c37rz8979i0862m61dlgf_11.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top