1.import java.awt.*;
2.import java.awt.event.*;
3.import java.text.SimpleDateFormat;
4.import java.util.Calendar;
5.import java.util.Date;
6.import javax.swing.*;
7.
8./**
9.* 日期计算器
10. *
11. * @author Cyin
12. * @author Lee
13. * @author YOYO
14. * @author Skittles
15. *
16. * @since 2008-11-24
17. * @version 0.1
18. *
19. */
20. public class DateCalculator extends JFrame {
21.
22. /**
23. * 主面板
24. */
25. JPanel context = new JPanel();
26.
27. /**
28. * 三个子面板
29. */
30. JPanel displayPanel = new JPanel();
31. JPanel numPanel = new JPanel();
32. JPanel opPanel = new JPanel();
33.
34. /**
35. * 结果文本框
36. */
37. JTextField result = new JTextField("0",20); 38.
39. /**
40. * 主要按钮
41. */
42. JButton btnCE = new JButton("CE");
43. JButton btnPlus = new JButton("+");
44. JButton btnMinus = new JButton("-");