Java璇剧▼璁捐瀹為獙鎶ュ憡鍙婂叏閮ㄦ簮鐮佹祦绋嬪浘 - 鐧惧害鏂囧簱 联系客服

发布时间 : 星期六 文章Java璇剧▼璁捐瀹為獙鎶ュ憡鍙婂叏閮ㄦ簮鐮佹祦绋嬪浘 - 鐧惧害鏂囧簱更新完毕开始阅读526c64ebd4d8d15abe234edf

\

{

public void actionPerformed(ActionEvent e) { Button_dayyearboxActionPerformed(e); } });

}

pane_day.add(Label_title[i]);

for (int i = 0; i < 42; i++) {

Button_day[i] = new JButton(\Button_day[i].setFont(new

Font(\

\

Button_day[i].setBorderPainted(false); Button_day[i].setContentAreaFilled(false); pane_day.add(Button_day[i]);

Button_day[i].addMouseListener(police);

Button_day[i].addActionListener(new ActionListener()

}

this.setYM();

this.setImg(month_num); this.setDay(); this.add(jP);

//jp.setSize(1150,750);

//jp.setContentAreaFilled(false); this.setLayout(new BorderLayout()); this.add(pane_ym, BorderLayout.NORTH); //this.setSize(100,250); this.setSize(1150,750);

jP.setOpaque(false);

this.add(pane_day, BorderLayout.CENTER);

setSize(1150,750); //setSize(300,300);

}

void setYM() { }

void setDay() { 年份值

//月份

if (month_num == 0||month_num == 2 ||month_num == 4 for (int i = 0; i < 7; i++) { }

Label_title[i].setText(week[i]);

String week[] = { \日\\一\二\\三\\四\\五\\六\};

int day = 0; int day_week = 0;

GregorianCalendar cal = new GregorianCalendar(); //创建一cal.setTime(dt);

个Calendar实例

Date dt = new Date(year_set, month_num, 1); //构造一个日int year_set = Integer.parseInt(year_num) - 1900; //获得if (bool) { } else { }

year_num = Year.getText();

month_num = Month.getSelectedIndex();

year_num = this_year + \month_num = this_month;

||month_num == 6 ||

}

month_num == 7|| month_num == 9 ||month_num == 11) { day = 31;

else if (month_num == 3 ||month_num == 5 || } else{ }

day_week = dt.getDay(); int count = 1;

for (int i = day_week; i < day_week + day; count++, i++) {

if (i % 7 == 0 ||i == 13||i == 20||i == 27||

}

if (i == day_week + this_date.getDate() -1) {

Button_day[i].setText(count + \Button_day[i].setForeground(Color.black); i == 6 ||i == 34 ||i == 41) {

Button_day[i].setForeground(Color.blue); Button_day[i].setText(count + \Button_day[i].setForeground(Color.red); Button_day[i].setText(count + \if (i == day_week + this_date.getDate() -1) { if (cal.isLeapYear(year_set)) { } else { }

day = 28; day = 29;

month_num == 8 ||month_num == 10) { day = 30;

} else {

} else {

Button_day[i].setForeground(Color.blue);

} else {

}

}

}

}

Button_day[i].setText(count + \

if (day_week == 0) { }

for (int i = day; i < 42; i++) { }

for (int i = 0; i < day_week; i++) { }

for (int i = day_week + day; i < 42; i++) { }

Button_day[i].setText(\

Button_day[i].setText(\

Button_day[i].setText(\

Button_day[i].setContentAreaFilled(false); Button_day[i].addActionListener(this);

} else {

Calendar calendar= Calendar.getInstance();

public int getYear(){return Integer.parseInt(year_num);} public int getMonth(){return month_num;}

public int getWeek(){ 片

imgLabel = new JLabel(img[0]);//将背景图放在标签里

week=calendar.get(DAY_OF_WEEK); return week;}

//System.out.println(month_num); /*if(mon_num==0){

img[0] = new ImageIcon(\这是背景图

void setImg(int month_num){

//month_num = Month.getSelectedIndex();