package calender;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Calendar;
import javax.swing.*;
public class CalendaBean implements ActionListener {
JLabel[] label;
JLabel now;
String[] day;
int year = 0, month = 0;
public void setYear(int year) {
this.year = year;
}
public void setMonth(int month) {
this.month = month;
}
public void actionPerformed(ActionEvent e) {
String str = e.getActionCommand();
if (str.equals("lastmonth")) {
month--;
if (month == 0) {
month = 12;
year--;
}
}
else if (str.equals("nextmonth")) {
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余2页未读,立即下载