• 大小: 19KB
    文件类型: .java
    金币: 1
    下载: 0 次
    发布日期: 2021-05-28
  • 语言: Java
  • 标签: JAVA  备忘录  

资源简介

用JAVA编写的备忘录, 可以记录下你每天做的事情,可以查看你以前做的事情,很有帮助

资源截图

代码片段和文件信息

import java.awt.*;
import java.awt.event.*;
import java.awt.Color;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.border.*;
import java.util.*;
import java.util.Calendar;
import java.io.*;
import java.io.IOException;

public class calendar extends Jframe
implements ActionListenerMouseListener
{
    int yearmonthday;
    int yearafterquerymonthafterquery;
    int startday;
    String SwitchMonth;
    String key;
    int changeyearmessage;
    int changemonthmessage;
    int priormonthprioryear;
    boolean ischange=falseischange_priornext=false;
    private JPanel LeftPaneRightPane;
    
    private JLabel YearLabel;
    private JLabel MonthLabel;
    private JComboBox MonthCombobox;
    private JTextField ShowDays[]=new JTextField[42];
    private JTextField YearText;
    private JLabel Ask;
    private JLabel ShowDate;
    private JLabel Blank;
    private JLabel show;
    private  JLabel TopBartitle[]=new JLabel[7];
    private JButton ToToday;
    private JButton Query;
    private String week[]={“星期日““星期一““星期二““星期三““星期四““星期五““星期六“};
    
    private JLabel NorthMonthDayYear;
    private JTextArea CenterText;
    private JButton SouthSaveSouthDelete;
    private JButton PriorMonth;
    private JButton NextMonth;
    public calendar(int yearint monthint day)
    {
     settitle(“备忘录“);
     //the layout about left of Jpane
     RightPane=new JPanel();
     JPanel rightCenter=new JPanel();
     JPanel rightNorth=new JPanel();
 
     RightPane.setLayout(new BorderLayout());
     RightPane.add(rightNorthBorderLayout.NORTH);
     RightPane.add(rightCenterBorderLayout.CENTER);
    
     RightPane.add(ToToday=new JButton(“Go to today“)BorderLayout.SOUTH);
     ToToday.setBackground(Color.cyan);
     ToToday.addActionListener(this);
     RightPane.validate();
     
     
     rightNorth.setLayout(new GridLayout(310-2));
     rightNorth.add(Ask=new JLabel(“请输入你要查询的日子“));
     JPanel North=new JPanel(new FlowLayout(080));
     rightNorth.add(North);
     North.add(YearLabel=new JLabel(“年:“));
     North.add(YearText=new JTextField(4));
     YearText.setBackground(Color.getHSBColor(302050));
     YearText.setForeground(Color.blue);
     YearText.setFont(new Font(“TimesRoman“Font.BOLD17));
     YearText.addActionListener(this);
     YearText.setFocusable(true);
     North.add(Blank=new JLabel(“月:“));
     North.add(MonthCombobox=new JComboBox());
     //add month to monthcombobox
     for(int i=1;i<=12;i++)
     {
         MonthCombobox.addItem(new Integer(i));
     }
     //Switch the month
     MonthCombobox.setForeground(Color.blue);
     MonthCombobox.setFont(new Font(“TimesRoman“Font.BOLD12));
     North.add(Query=new JButton(“查询“));
     Query.setForeground(Color.blue);
     Query.addActionListener(this);
     JPanel North2=new JPanel(new FlowLayout());
     rightNorth.add(North2);
     North2.add(PriorMonth=new

评论

共有 条评论