java万年历课程设计

时间:2015-07-25 15:38:56
【文件属性】:

文件名称:java万年历课程设计

文件大小:269KB

文件格式:DOC

更新时间:2015-07-25 15:38:56

java 万年历 课程设计

java万年历课程设计,有源代码 源代码片段:public class wannianli extends JFrame implements ActionListener, MouseListener { private Calendar cld = Calendar.getInstance(); private String [] astr = {"星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"}; private DefaultTableModel dtm = new DefaultTableModel(null,astr); private JTable table = new JTable(dtm); //装日期的表格 private JScrollPane sp = new JScrollPane(table); private JButton bLastYear = new JButton("上一年"); private JButton bNextYear = new JButton("下一年"); private JButton bLastMonth = new JButton("上月"); private JButton bNextMonth = new JButton("下月"); private JTextField jtfYear = new JTextField(5);//jtfYear年份显示和输入文本框,允许编辑单行文本 private JTextField jtfMonth = new JTextField(2);//jtfMonth月份显示文本框 private JPanel p1 = new JPanel(); //装入控制日期按钮的模块 private JPanel p2 = new JPanel(); private JPanel p3 = new JPanel(new BorderLayout()); private JPanel p4 = new JPanel(new GridLayout(2,1)); private JPanel p5 = new JPanel(new BorderLayout()); private JButton bAdd = new JButton("保存日志"); private JButton bDel = new JButton("删除日志"); private JTextArea jta = new JTextArea(); //JTextArea 是一个显示纯文本的多行区域 private JScrollPane jsp = new JScrollPane(jta); //管理视口、可选的垂直和水平滚动条以及可选的行和列标题视口 private JLabel l = new JLabel("小提示:可直接输入年份,提高查询效率!"); private JLabel lt = new JLabel();//系统时间 private JLabel ld = new JLabel();//日期是否被选择 private int lastTime; JMenuBar jmb = new JMenuBar(); JMenu view;


网友评论

  • 你的写很符合我的需求 谢谢