快速业务通道

ó?JavaD′ò???è?àúD?3ìDò£-′ú?? - ±à3ìè???í?

作者 佚名技术 来源 NET编程 浏览 发布时间 2012-06-21

ó?JavaD′ò???è?àúD?3ìDò£-′ú??

ê±??:2011-01-11 sundunjam

SDate2?·?£o

class SDate { ???????? public static int accountDays(int year,int month) { ???????????????? switch (month) { ???????????????? case 1: ???????????????? case 3: ???????????????? case 5: ???????????????? case 7: ???????????????? case 8: ???????????????? case 10: ???????????????? case 12: ???????????????????????? return 31; ???????????????? case 2: ???????????????????????? if(isLeap(year)) ???????????????????????????????? return 29; ???????????????????????? else return 28; ???????????????? default: ???????????????????????? return 30; ???????????????? } ???????? } ???????? public static boolean isLeap(int year) { ???????????????? if (year%4 == 0 && year%100 != 0) ???????????????????????? return true; ???????????????? else if (year%100 == 0 && year%400 == 0) ???????????????????????? return true; ???????????????? else???? ???????????????????????? return false; ???????? } ???????? public static int fixDay(int year,int month) { ???????????????? int base_year = 1; ???????????????? int[] base_month = {0,0,3,3,6,1,4,0,3,5,0,3,5}; ???????????????? if (isLeap(year)) { ???????????????????????? base_year++; ???????????????????????? for (int i = 3; i<=6; i++) { ???????????????????????????????? base_month[i] += 1; ???????????????????????????????? if (base_month[i] == 7) { ???????????????????????????????????????? base_month[i] = 0; ???????????????????????????????? } ???????????????????????? } ???????????????????????? for (int i = 9; i <= 12; i++) { ???????????????????????????????? base_month[i] += 1; ???????????????????????????????? if (base_month[i] == 7) { ???????????????????????????????????????? base_month[i] = 0; ???????????????????????????????? } ???????????????????????? } ???????????????? } ???????????????? return (year+year/4+year/400-year/100-base_year+base_month[month]+1)%7; ???????? } }

DateGrid2?·?£o

import Javax.swing.*; import java.awt.*; import java.awt.event.*; import javax.swing.border.*; import java.util.*; public class DateGrid extends JWindow implements ActionListener { ???????? //DateGridμ?11?ì·?·¨ ???????? public DateGrid() { ???????????????? super(); ???????????????? this.design(); ???????? }

喘Java亟匯倖晩煽弌殻會?旗鷹(2)

扮寂:2011-01-11 sundunjam

//屁悶下蕉譜柴?

Calendar c = Calendar.getInstance();      JPanel calendar_ym = null;          Color deepblue = new Color(19,63,164);          JButton left = new JButton("<<");          JButton right = new JButton(">>");          Label year = new Label();          Label month = new Label();          int year_now = c.get(Calendar.YEAR);          int month_now = c.get(Calendar.MONTH);      JPanel calendar_wd = null;//頁caledar_week才calendar_days議悳淫否悶          JPanel calendar_week = null;      JPanel calendar_exit = null;          JButton quit =

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号