home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / VCAFE.3.0A / Sample.bin / Calendar1.java < prev    next >
Text File  |  1998-11-02  |  39KB  |  1,433 lines

  1. /*
  2.  * Title: Calendar
  3.  * Type: Applet
  4.  * Source: Calendar.java
  5.  * Application Description: Display a calendar window with the
  6.  * month/year selected by the user.  When a date is selected,
  7.  * a it is displayed in the scrolling text box at the top.
  8.  *
  9.  * Symantec Corporation.
  10.  */
  11.  
  12. import java.awt.*;
  13. import java.applet.*;
  14.  
  15. import java.util.Date;
  16. import java.util.Hashtable;
  17. import symantec.itools.awt.util.StatusScroller;
  18. import symantec.itools.multimedia.ScrollingText;
  19. import java.util.GregorianCalendar;
  20. import java.util.Calendar;
  21.  
  22. public class Calendar1 extends Applet
  23. {
  24.     //{{DECLARE_CONTROLS
  25.     java.awt.Panel dayPanel = new java.awt.Panel();
  26.     java.awt.Label sunLabel = new java.awt.Label();
  27.     java.awt.Label monLabel = new java.awt.Label();
  28.     java.awt.Label tueLabel = new java.awt.Label();
  29.     java.awt.Label wedLabel = new java.awt.Label();
  30.     java.awt.Label thursLabel = new java.awt.Label();
  31.     java.awt.Label friLabel = new java.awt.Label();
  32.     java.awt.Label satLabel = new java.awt.Label();
  33.     java.awt.Panel datePanel = new java.awt.Panel();
  34.     java.awt.Button button1 = new java.awt.Button();
  35.     java.awt.Button button2 = new java.awt.Button();
  36.     java.awt.Button button3 = new java.awt.Button();
  37.     java.awt.Button button4 = new java.awt.Button();
  38.     java.awt.Button button5 = new java.awt.Button();
  39.     java.awt.Button button6 = new java.awt.Button();
  40.     java.awt.Button button7 = new java.awt.Button();
  41.     java.awt.Button button8 = new java.awt.Button();
  42.     java.awt.Button button9 = new java.awt.Button();
  43.     java.awt.Button button10 = new java.awt.Button();
  44.     java.awt.Button button11 = new java.awt.Button();
  45.     java.awt.Button button12 = new java.awt.Button();
  46.     java.awt.Button button13 = new java.awt.Button();
  47.     java.awt.Button button14 = new java.awt.Button();
  48.     java.awt.Button button15 = new java.awt.Button();
  49.     java.awt.Button button16 = new java.awt.Button();
  50.     java.awt.Button button17 = new java.awt.Button();
  51.     java.awt.Button button18 = new java.awt.Button();
  52.     java.awt.Button button19 = new java.awt.Button();
  53.     java.awt.Button button20 = new java.awt.Button();
  54.     java.awt.Button button21 = new java.awt.Button();
  55.     java.awt.Button button22 = new java.awt.Button();
  56.     java.awt.Button button23 = new java.awt.Button();
  57.     java.awt.Button button24 = new java.awt.Button();
  58.     java.awt.Button button25 = new java.awt.Button();
  59.     java.awt.Button button26 = new java.awt.Button();
  60.     java.awt.Button button27 = new java.awt.Button();
  61.     java.awt.Button button28 = new java.awt.Button();
  62.     java.awt.Button button29 = new java.awt.Button();
  63.     java.awt.Button button30 = new java.awt.Button();
  64.     java.awt.Button button31 = new java.awt.Button();
  65.     java.awt.Button button32 = new java.awt.Button();
  66.     java.awt.Button button33 = new java.awt.Button();
  67.     java.awt.Button button34 = new java.awt.Button();
  68.     java.awt.Button button35 = new java.awt.Button();
  69.     java.awt.Button button36 = new java.awt.Button();
  70.     java.awt.Button button37 = new java.awt.Button();
  71.     java.awt.Button button38 = new java.awt.Button();
  72.     java.awt.Button button39 = new java.awt.Button();
  73.     java.awt.Button button40 = new java.awt.Button();
  74.     java.awt.Button button41 = new java.awt.Button();
  75.     java.awt.Button button42 = new java.awt.Button();
  76.     java.awt.Panel selPanel = new java.awt.Panel();
  77.     java.awt.Button rightButton = new java.awt.Button();
  78.     java.awt.TextField date = new java.awt.TextField();
  79.     java.awt.Button leftButton = new java.awt.Button();
  80.     symantec.itools.multimedia.ScrollingText scrollingTextDisplayDate = new symantec.itools.multimedia.ScrollingText();
  81.     //}}
  82.     Button myButton[];                  // The calendar date buttons
  83.     boolean loaded = true;
  84.     Graphics textGC;
  85.     int thismonth;                      // App. variable
  86.     int thisyear;                       // App. variable
  87.     int days;                           // App. variable
  88.     int dayselected;                    // App. variable
  89.     GregorianCalendar dateSelected;                  // User-selected Date object
  90.     int buttonShift;                    // Used to determine what day the
  91.                                         // 1st of the month falls on
  92.  
  93.     public void init()
  94.     {
  95.         // Take out this line if you don't use symantec.itools.net.RelativeURL or symantec.itools.awt.util.StatusScroller
  96.         symantec.itools.lang.Context.setApplet(this);
  97.  
  98.         // This code is automatically generated by Visual Cafe when you add
  99.         // components to the visual environment. It instantiates and initializes
  100.         // the components. To modify the code, only use code syntax that matches
  101.         // what Visual Cafe can generate, or Visual Cafe may be unable to back
  102.         // parse your Java file into its visual environment.
  103.         //{{INIT_CONTROLS
  104.         setLayout(null);
  105.         setBackground(java.awt.Color.white);
  106.         setForeground(java.awt.Color.black);
  107.         setFont(new Font("Dialog", Font.PLAIN, 12));
  108.         setSize(421,369);
  109.         dayPanel.setLayout(new GridLayout(1,7,5,5));
  110.         add(dayPanel);
  111.         dayPanel.setBackground(java.awt.Color.lightGray);
  112.         dayPanel.setBounds(24,84,372,26);
  113.         sunLabel.setText("Sun");
  114.         sunLabel.setAlignment(java.awt.Label.CENTER);
  115.         dayPanel.add(sunLabel);
  116.         sunLabel.setBounds(0,0,48,26);
  117.         monLabel.setText("Mon");
  118.         monLabel.setAlignment(java.awt.Label.CENTER);
  119.         dayPanel.add(monLabel);
  120.         monLabel.setBounds(53,0,48,26);
  121.         tueLabel.setText("Tue");
  122.         tueLabel.setAlignment(java.awt.Label.CENTER);
  123.         dayPanel.add(tueLabel);
  124.         tueLabel.setBounds(106,0,48,26);
  125.         wedLabel.setText("Wed");
  126.         wedLabel.setAlignment(java.awt.Label.CENTER);
  127.         dayPanel.add(wedLabel);
  128.         wedLabel.setBounds(159,0,48,26);
  129.         thursLabel.setText("Thur");
  130.         thursLabel.setAlignment(java.awt.Label.CENTER);
  131.         dayPanel.add(thursLabel);
  132.         thursLabel.setBounds(212,0,48,26);
  133.         friLabel.setText("Fri");
  134.         friLabel.setAlignment(java.awt.Label.CENTER);
  135.         dayPanel.add(friLabel);
  136.         friLabel.setBounds(265,0,48,26);
  137.         satLabel.setText("Sat");
  138.         satLabel.setAlignment(java.awt.Label.CENTER);
  139.         dayPanel.add(satLabel);
  140.         satLabel.setBounds(318,0,48,26);
  141.         datePanel.setLayout(new GridLayout(6,7,1,1));
  142.         add(datePanel);
  143.         datePanel.setBounds(24,120,374,214);
  144.         button1.setActionCommand("button");
  145.         datePanel.add(button1);
  146.         button1.setBounds(0,0,52,34);
  147.         button2.setActionCommand("button");
  148.         datePanel.add(button2);
  149.         button2.setBounds(53,0,52,34);
  150.         button3.setActionCommand("button");
  151.         datePanel.add(button3);
  152.         button3.setBounds(106,0,52,34);
  153.         button4.setActionCommand("button");
  154.         datePanel.add(button4);
  155.         button4.setBounds(159,0,52,34);
  156.         button5.setActionCommand("button");
  157.         datePanel.add(button5);
  158.         button5.setBounds(212,0,52,34);
  159.         button6.setActionCommand("button");
  160.         datePanel.add(button6);
  161.         button6.setBounds(265,0,52,34);
  162.         button7.setActionCommand("button");
  163.         datePanel.add(button7);
  164.         button7.setBounds(318,0,52,34);
  165.         button8.setActionCommand("button");
  166.         datePanel.add(button8);
  167.         button8.setBounds(0,35,52,34);
  168.         button9.setActionCommand("button");
  169.         datePanel.add(button9);
  170.         button9.setBounds(53,35,52,34);
  171.         button10.setActionCommand("button");
  172.         datePanel.add(button10);
  173.         button10.setBounds(106,35,52,34);
  174.         button11.setActionCommand("button");
  175.         datePanel.add(button11);
  176.         button11.setBounds(159,35,52,34);
  177.         button12.setActionCommand("button");
  178.         datePanel.add(button12);
  179.         button12.setBounds(212,35,52,34);
  180.         button13.setActionCommand("button");
  181.         datePanel.add(button13);
  182.         button13.setBounds(265,35,52,34);
  183.         button14.setActionCommand("button");
  184.         datePanel.add(button14);
  185.         button14.setBounds(318,35,52,34);
  186.         button15.setActionCommand("button");
  187.         datePanel.add(button15);
  188.         button15.setBounds(0,70,52,34);
  189.         button16.setActionCommand("button");
  190.         datePanel.add(button16);
  191.         button16.setBounds(53,70,52,34);
  192.         button17.setActionCommand("button");
  193.         datePanel.add(button17);
  194.         button17.setBounds(106,70,52,34);
  195.         button18.setActionCommand("button");
  196.         datePanel.add(button18);
  197.         button18.setBounds(159,70,52,34);
  198.         button19.setActionCommand("button");
  199.         datePanel.add(button19);
  200.         button19.setBounds(212,70,52,34);
  201.         button20.setActionCommand("button");
  202.         datePanel.add(button20);
  203.         button20.setBounds(265,70,52,34);
  204.         button21.setActionCommand("button");
  205.         datePanel.add(button21);
  206.         button21.setBounds(318,70,52,34);
  207.         button22.setActionCommand("button");
  208.         datePanel.add(button22);
  209.         button22.setBounds(0,105,52,34);
  210.         button23.setActionCommand("button");
  211.         datePanel.add(button23);
  212.         button23.setBounds(53,105,52,34);
  213.         button24.setActionCommand("button");
  214.         datePanel.add(button24);
  215.         button24.setBounds(106,105,52,34);
  216.         button25.setActionCommand("button");
  217.         datePanel.add(button25);
  218.         button25.setBounds(159,105,52,34);
  219.         button26.setActionCommand("button");
  220.         datePanel.add(button26);
  221.         button26.setBounds(212,105,52,34);
  222.         button27.setActionCommand("button");
  223.         datePanel.add(button27);
  224.         button27.setBounds(265,105,52,34);
  225.         button28.setActionCommand("button");
  226.         datePanel.add(button28);
  227.         button28.setBounds(318,105,52,34);
  228.         button29.setActionCommand("button");
  229.         datePanel.add(button29);
  230.         button29.setBounds(0,140,52,34);
  231.         button30.setActionCommand("button");
  232.         datePanel.add(button30);
  233.         button30.setBounds(53,140,52,34);
  234.         button31.setActionCommand("button");
  235.         datePanel.add(button31);
  236.         button31.setBounds(106,140,52,34);
  237.         button32.setActionCommand("button");
  238.         datePanel.add(button32);
  239.         button32.setBounds(159,140,52,34);
  240.         button33.setActionCommand("button");
  241.         datePanel.add(button33);
  242.         button33.setBounds(212,140,52,34);
  243.         button34.setActionCommand("button");
  244.         datePanel.add(button34);
  245.         button34.setBounds(265,140,52,34);
  246.         button35.setActionCommand("button");
  247.         datePanel.add(button35);
  248.         button35.setBounds(318,140,52,34);
  249.         button36.setActionCommand("button");
  250.         datePanel.add(button36);
  251.         button36.setBounds(0,175,52,34);
  252.         button37.setActionCommand("button");
  253.         datePanel.add(button37);
  254.         button37.setBounds(53,175,52,34);
  255.         button38.setActionCommand("button");
  256.         datePanel.add(button38);
  257.         button38.setBounds(106,175,52,34);
  258.         button39.setActionCommand("button");
  259.         datePanel.add(button39);
  260.         button39.setBounds(159,175,52,34);
  261.         button40.setActionCommand("button");
  262.         datePanel.add(button40);
  263.         button40.setBounds(212,175,52,34);
  264.         button41.setActionCommand("button");
  265.         datePanel.add(button41);
  266.         button41.setBounds(265,175,52,34);
  267.         button42.setActionCommand("button");
  268.         datePanel.add(button42);
  269.         button42.setBounds(318,175,52,34);
  270.         selPanel.setLayout(null);
  271.         add(selPanel);
  272.         selPanel.setBounds(24,48,372,24);
  273.         rightButton.setLabel(">>>");
  274.         selPanel.add(rightButton);
  275.         rightButton.setBackground(java.awt.Color.lightGray);
  276.         rightButton.setBounds(288,0,38,26);
  277.         date.setEditable(false);
  278.         selPanel.add(date);
  279.         date.setBounds(132,0,120,24);
  280.         leftButton.setLabel("<<<");
  281.         selPanel.add(leftButton);
  282.         leftButton.setBackground(java.awt.Color.lightGray);
  283.         leftButton.setBounds(60,0,36,24);
  284.         try {
  285.             {
  286.                 String[] tempString = new String[1];
  287.                 tempString[0] = "Welcome to the JAVA Calender!!";
  288.                 scrollingTextDisplayDate.setMessageList(tempString);
  289.             }
  290.         }
  291.         catch(java.beans.PropertyVetoException e) { }
  292.         scrollingTextDisplayDate.setEnabled(false);
  293.         add(scrollingTextDisplayDate);
  294.         scrollingTextDisplayDate.setBackground(java.awt.Color.blue);
  295.         scrollingTextDisplayDate.setForeground(java.awt.Color.white);
  296.         scrollingTextDisplayDate.setFont(new Font("Dialog", Font.BOLD, 12));
  297.         scrollingTextDisplayDate.setBounds(24,12,372,24);
  298.         //}}
  299.         
  300.         //{{REGISTER_LISTENERS
  301.         SymMouse aSymMouse = new SymMouse();
  302.         rightButton.addMouseListener(aSymMouse);
  303.         leftButton.addMouseListener(aSymMouse);
  304.         button1.addMouseListener(aSymMouse);
  305.         button2.addMouseListener(aSymMouse);
  306.         button3.addMouseListener(aSymMouse);
  307.         button4.addMouseListener(aSymMouse);
  308.         button5.addMouseListener(aSymMouse);
  309.         button6.addMouseListener(aSymMouse);
  310.         button7.addMouseListener(aSymMouse);
  311.         button8.addMouseListener(aSymMouse);
  312.         button9.addMouseListener(aSymMouse);
  313.         button10.addMouseListener(aSymMouse);
  314.         button11.addMouseListener(aSymMouse);
  315.         button12.addMouseListener(aSymMouse);
  316.         button13.addMouseListener(aSymMouse);
  317.         button14.addMouseListener(aSymMouse);
  318.         button15.addMouseListener(aSymMouse);
  319.         button16.addMouseListener(aSymMouse);
  320.         button17.addMouseListener(aSymMouse);
  321.         button18.addMouseListener(aSymMouse);
  322.         button19.addMouseListener(aSymMouse);
  323.         button20.addMouseListener(aSymMouse);
  324.         button21.addMouseListener(aSymMouse);
  325.         button22.addMouseListener(aSymMouse);
  326.         button23.addMouseListener(aSymMouse);
  327.         button24.addMouseListener(aSymMouse);
  328.         button25.addMouseListener(aSymMouse);
  329.         button26.addMouseListener(aSymMouse);
  330.         button27.addMouseListener(aSymMouse);
  331.         button28.addMouseListener(aSymMouse);
  332.         button29.addMouseListener(aSymMouse);
  333.         button30.addMouseListener(aSymMouse);
  334.         button31.addMouseListener(aSymMouse);
  335.         button32.addMouseListener(aSymMouse);
  336.         button33.addMouseListener(aSymMouse);
  337.         button34.addMouseListener(aSymMouse);
  338.         button35.addMouseListener(aSymMouse);
  339.         button36.addMouseListener(aSymMouse);
  340.         button37.addMouseListener(aSymMouse);
  341.         button38.addMouseListener(aSymMouse);
  342.         button39.addMouseListener(aSymMouse);
  343.         button40.addMouseListener(aSymMouse);
  344.         button41.addMouseListener(aSymMouse);
  345.         button42.addMouseListener(aSymMouse);
  346.         //}}
  347.     
  348.         }
  349.  
  350.     /**
  351.      * Adds all the day buttons to an array
  352.      */
  353.     public void SetButtonArray()
  354.     {
  355.         myButton = new Button[42];
  356.         myButton[0] = button1;
  357.         myButton[1] = button2;
  358.         myButton[2] = button3;
  359.         myButton[3] = button4;
  360.         myButton[4] = button5;
  361.         myButton[5] = button6;
  362.         myButton[6] = button7;
  363.         myButton[7] = button8;
  364.         myButton[8] = button9;
  365.         myButton[9] = button10;
  366.         myButton[10] = button11;
  367.         myButton[11] = button12;
  368.         myButton[12] = button13;
  369.         myButton[13] = button14;
  370.         myButton[14] = button15;
  371.         myButton[15] = button16;
  372.         myButton[16] = button17;
  373.         myButton[17] = button18;
  374.         myButton[18] = button19;
  375.         myButton[19] = button20;
  376.         myButton[20] = button21;
  377.         myButton[21] = button22;
  378.         myButton[22] = button23;
  379.         myButton[23] = button24;
  380.         myButton[24] = button25;
  381.         myButton[25] = button26;
  382.         myButton[26] = button27;
  383.         myButton[27] = button28;
  384.         myButton[28] = button29;
  385.         myButton[29] = button30;
  386.         myButton[30] = button31;
  387.         myButton[31] = button32;
  388.         myButton[32] = button33;
  389.         myButton[33] = button34;
  390.         myButton[34] = button35;
  391.         myButton[35] = button36;
  392.         myButton[36] = button37;
  393.         myButton[37] = button38;
  394.         myButton[38] = button39;
  395.         myButton[39] = button40;
  396.         myButton[40] = button41;
  397.         myButton[41] = button42;
  398.     }
  399.     
  400.     /**
  401.      * Find out today's date and set up the calendar to display the correct
  402.      * month and year
  403.      */
  404.     public void start()
  405.     {
  406.         SetButtonArray();
  407.         Date todaydate = new Date();
  408.         GregorianCalendar gc = new GregorianCalendar();
  409.         gc.setTime(todaydate);
  410.         setMonthString(gc);
  411.         setCalendar(gc);
  412.     }
  413.  
  414.     /**
  415.      * Given a Date, set up the calendar elements to display the
  416.      * appropriate dates on the appropriate calendar buttons.
  417.      */
  418.     private void setCalendar(GregorianCalendar c)
  419.     {
  420.         //clear calendar
  421.         for(int i = 0; i < 42; i++)
  422.         {
  423.             myButton[i].setLabel("");
  424.         }
  425.  
  426.  
  427.         
  428.         int thisMo = c.get(java.util.Calendar.MONTH);
  429.         int thisDy = c.get(java.util.Calendar.DAY_OF_WEEK);
  430.         int thisYr = c.get(java.util.Calendar.YEAR);
  431.  
  432.         //Find the day of the week of the first
  433.         GregorianCalendar gc = new GregorianCalendar(thisYr, thisMo, 1);
  434.         int dayoffirst = gc.get(java.util.Calendar.DAY_OF_WEEK);
  435.         buttonShift = dayoffirst;
  436.  
  437.         int dayspermonth = getDaysPerMonth(thisMo);
  438.         for(int i = 1; i < dayspermonth+1; i++)
  439.         {
  440.             myButton[i+buttonShift-1].setLabel(Integer.toString(i));
  441.         }
  442.     }
  443.  
  444.  
  445.     /**
  446.      * Given a Date, set the text field to display it as a
  447.      * string containing the month and the year.
  448.      */
  449.     private void setMonthString(GregorianCalendar gc)
  450.     {
  451.         thismonth = gc.get(java.util.Calendar.MONTH);
  452.         thisyear = gc.get(java.util.Calendar.YEAR);
  453.         
  454.         String monthstring = getMonth(thismonth);
  455.         
  456.         String temp = (monthstring +" ");
  457.         temp = temp + (Integer.toString(thisyear));
  458.         date.setText(temp);
  459.     }
  460.     
  461.     /**
  462.      * Given the month number, returns a string containing the month.
  463.      */
  464.     private String getMonth(int month)
  465.     {
  466.         String monthstring;
  467.  
  468.         switch(month)
  469.         {
  470.             case 0:
  471.                 monthstring = "January";
  472.                 break;
  473.             case 1:
  474.                 monthstring = "February";
  475.                 break;
  476.             case 2:
  477.                 monthstring = "March";
  478.                 break;
  479.             case 3:
  480.                 monthstring = "April";
  481.                 break;
  482.             case 4:
  483.                 monthstring = "May";
  484.                 break;
  485.             case 5:
  486.                 monthstring = "June";
  487.                 break;
  488.             case 6:
  489.                 monthstring = "July";
  490.                 break;
  491.             case 7:
  492.                 monthstring = "August";
  493.                 break;
  494.             case 8:
  495.                 monthstring = "September";
  496.                 break;
  497.             case 9:
  498.                 monthstring = "October";
  499.                 break;
  500.             case 10:
  501.                 monthstring = "November";
  502.                 break;
  503.             case 11:
  504.                 monthstring = "December";
  505.                 break;
  506.              default:
  507.                 monthstring = "Month";
  508.                 break;
  509.             }
  510.             
  511.             return monthstring;
  512.     }
  513.  
  514.  
  515.     /**
  516.      * Increments the calendar (both Mo/Yr text field and date buttons)
  517.      * to the next sequential month/year combination.
  518.      */
  519.     private void incrementCalendar()
  520.     {
  521.         thismonth += 1;
  522.         if(thismonth > 12)
  523.         {
  524.             thismonth = 0;
  525.             thisyear += 1;
  526.         }
  527.         GregorianCalendar incDate = new GregorianCalendar(thisyear, thismonth, 1);
  528.         setMonthString(incDate);
  529.         setCalendar(incDate);
  530.         
  531.         java.lang.String[] tempString = new java.lang.String[1];
  532.         tempString[0] = new java.lang.String(getMonth(thismonth)+ " " +(Integer.toString(thisyear)));
  533.         
  534.         try 
  535.         {
  536.             scrollingTextDisplayDate.setMessageList(tempString);
  537.         }
  538.         catch(java.beans.PropertyVetoException e) { }
  539.     }
  540.  
  541.  
  542.     /**
  543.      * Decrements the calendar (both Mo/Yr text field and date buttons)
  544.      * to the previous sequential month/year combination.
  545.      */
  546.     private void decrementCalendar()
  547.     {
  548.         thismonth -= 1;
  549.         if(thismonth < 0)
  550.         {
  551.             thismonth = 11;
  552.             thisyear -= 1;
  553.         }
  554.         GregorianCalendar decDate = new GregorianCalendar(thisyear, thismonth, 1);
  555.         setMonthString(decDate);
  556.         setCalendar(decDate);
  557.  
  558.         java.lang.String[] tempString = new java.lang.String[1];
  559.         tempString[0] = new java.lang.String(getMonth(thismonth)+ " " +(Integer.toString(thisyear)));
  560.         
  561.         try 
  562.         {
  563.             scrollingTextDisplayDate.setMessageList(tempString);
  564.         }
  565.         catch(java.beans.PropertyVetoException e) { }
  566.     }
  567.  
  568.     /**
  569.      * Given a month (represented as an integer), return the
  570.      * number of days in that month (corrects for leap years).
  571.      */
  572.     private int getDaysPerMonth(int m)
  573.     {
  574.         switch(m)
  575.         {
  576.             case 0:
  577.                 days = 31;
  578.                 break;
  579.  
  580.             case 1:
  581.                 //Correct for a leap year
  582.                 int tempYear = thisyear;
  583.                 if((tempYear % 4) == 0)         // Could be leap
  584.                 {
  585.                     if((tempYear % 100) == 0 && // Centuries aren't
  586.                        (tempYear % 400) != 0)   // Except every 4th
  587.                         days = 28;
  588.                     else
  589.                         days = 29;
  590.                     break;
  591.                 }
  592.                 days = 28;
  593.                 break;
  594.  
  595.             case 2:
  596.                 days = 31;
  597.                 break;
  598.  
  599.             case 3:
  600.                 days = 30;
  601.                 break;
  602.             case 4:
  603.                 days = 31;
  604.                 break;
  605.  
  606.             case 5:
  607.                 days = 30;
  608.                 break;
  609.  
  610.             case 6:
  611.                 days = 31;
  612.                 break;
  613.  
  614.             case 7:
  615.                 days = 31;
  616.                 break;
  617.  
  618.             case 8:
  619.                 days = 30;
  620.                 break;
  621.  
  622.             case 9:
  623.                 days = 31;
  624.                 break;
  625.  
  626.             case 10:
  627.                 days = 30;
  628.                 break;
  629.  
  630.             case 11:
  631.                 days = 31;
  632.                 break;
  633.  
  634.             default:
  635.                 days = 31;
  636.                 break;
  637.          }
  638.           return days;
  639.     }
  640.  
  641.  
  642.     /**
  643.      * return the date that was selected by pushing a button
  644.      * on the calendar
  645.      */
  646.     private GregorianCalendar getDateSelected()
  647.     {
  648.         dateSelected = new GregorianCalendar(thisyear, thismonth, dayselected);
  649.         return dateSelected;
  650.     }
  651.  
  652.  
  653.     /**
  654.      * Given a date, set the scrolling text message
  655.      */
  656.     private void displayBannerText(GregorianCalendar gc)
  657.     {
  658.         int tempMo = (gc.get(java.util.Calendar.MONTH)) + 1;
  659.         int tempYr = (gc.get(java.util.Calendar.YEAR));
  660.         int tempDy = (gc.get(java.util.Calendar.DAY_OF_MONTH));
  661.         
  662.         java.lang.String[] tempString = new java.lang.String[1];
  663.            tempString[0] = new java.lang.String("You selected ");
  664.         tempString[0] += Integer.toString(tempMo);
  665.         tempString[0] += "/" + Integer.toString(tempDy);
  666.         tempString[0] += "/" + Integer.toString(tempYr);
  667.         
  668.         try 
  669.         {
  670.             scrollingTextDisplayDate.setMessageList(tempString);
  671.         }
  672.         catch(java.beans.PropertyVetoException e) { }
  673.      }
  674.     /**
  675.      * Handles mouse click on any day button
  676.      */
  677.     void updateDate(Button button)
  678.     {
  679.         String label = button.getLabel();
  680.         
  681.         if(label != "")
  682.         {
  683.             Integer tempInt = new Integer(label);
  684.             dayselected = tempInt.intValue();
  685.             dateSelected = getDateSelected();
  686.             displayBannerText(dateSelected);
  687.         }
  688.     }
  689.  
  690.  
  691.     class SymMouse extends java.awt.event.MouseAdapter
  692.     {
  693.         public void mouseClicked(java.awt.event.MouseEvent event)
  694.         {
  695.             Object object = event.getSource();
  696.             if (object == rightButton)
  697.                 rightButton_MouseClicked(event);
  698.             else if (object == leftButton)
  699.                 leftButton_MouseClicked(event);
  700.             else if (object == button1)
  701.                 button1_MouseClicked(event);
  702.             else if (object == button2)
  703.                 button2_MouseClicked(event);
  704.             else if (object == button3)
  705.                 button3_MouseClicked(event);
  706.             else if (object == button4)
  707.                 button4_MouseClicked(event);
  708.             else if (object == button5)
  709.                 button5_MouseClicked(event);
  710.             else if (object == button6)
  711.                 button6_MouseClicked(event);
  712.             else if (object == button7)
  713.                 button7_MouseClicked(event);
  714.             else if (object == button8)
  715.                 button8_MouseClicked(event);
  716.             else if (object == button9)
  717.                 button9_MouseClicked(event);
  718.             else if (object == button10)
  719.                 button10_MouseClicked(event);
  720.             else if (object == button11)
  721.                 button11_MouseClicked(event);
  722.             else if (object == button12)
  723.                 button12_MouseClicked(event);
  724.             else if (object == button13)
  725.                 button13_MouseClicked(event);
  726.             else if (object == button14)
  727.                 button14_MouseClicked(event);
  728.             else if (object == button15)
  729.                 button15_MouseClicked(event);
  730.             else if (object == button16)
  731.                 button16_MouseClicked(event);
  732.             else if (object == button17)
  733.                 button17_MouseClicked(event);
  734.             else if (object == button18)
  735.                 button18_MouseClicked(event);
  736.             else if (object == button19)
  737.                 button19_MouseClicked(event);
  738.             else if (object == button20)
  739.                 button20_MouseClicked(event);
  740.             else if (object == button21)
  741.                 button21_MouseClicked(event);
  742.             else if (object == button22)
  743.                 button22_MouseClicked(event);
  744.             else if (object == button23)
  745.                 button23_MouseClicked(event);
  746.             else if (object == button24)
  747.                 button24_MouseClicked(event);
  748.             else if (object == button25)
  749.                 button25_MouseClicked(event);
  750.             else if (object == button26)
  751.                 button26_MouseClicked(event);
  752.             else if (object == button27)
  753.                 button27_MouseClicked(event);
  754.             else if (object == button28)
  755.                 button28_MouseClicked(event);
  756.             else if (object == button29)
  757.                 button29_MouseClicked(event);
  758.             else if (object == button30)
  759.                 button30_MouseClicked(event);
  760.             else if (object == button31)
  761.                 button31_MouseClicked(event);
  762.             else if (object == button32)
  763.                 button32_MouseClicked(event);
  764.             else if (object == button33)
  765.                 button33_MouseClicked(event);
  766.             else if (object == button34)
  767.                 button34_MouseClicked(event);
  768.             else if (object == button35)
  769.                 button35_MouseClicked(event);
  770.             else if (object == button36)
  771.                 button36_MouseClicked(event);
  772.             else if (object == button37)
  773.                 button37_MouseClicked(event);
  774.             else if (object == button38)
  775.                 button38_MouseClicked(event);
  776.             else if (object == button39)
  777.                 button39_MouseClicked(event);
  778.             else if (object == button40)
  779.                 button40_MouseClicked(event);
  780.             else if (object == button41)
  781.                 button41_MouseClicked(event);
  782.             else if (object == button42)
  783.                 button42_MouseClicked(event);
  784.         }
  785.     }
  786.  
  787.     void rightButton_MouseClicked(java.awt.event.MouseEvent event)
  788.     {
  789.         // to do: code goes here.
  790.              
  791.         rightButton_MouseClicked_Interaction1(event);
  792.     }
  793.  
  794.  
  795.     void rightButton_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  796.     {
  797.         try {
  798.             this.incrementCalendar();
  799.         } catch (Exception e) {
  800.         }
  801.     }
  802.  
  803.  
  804.     void leftButton_MouseClicked(java.awt.event.MouseEvent event)
  805.     {
  806.         // to do: code goes here.
  807.              
  808.         leftButton_MouseClicked_Interaction1(event);
  809.     }
  810.  
  811.  
  812.     void leftButton_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  813.     {
  814.         try {
  815.             this.decrementCalendar();
  816.         } catch (Exception e) {
  817.         }
  818.     }
  819.  
  820.  
  821.     void button1_MouseClicked(java.awt.event.MouseEvent event)
  822.     {
  823.         // to do: code goes here.
  824.              
  825.         button1_MouseClicked_Interaction1(event);
  826.     }
  827.  
  828.  
  829.     void button1_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  830.     {
  831.         
  832.         updateDate((Button)event.getComponent());
  833.     }
  834.  
  835.  
  836.     void button2_MouseClicked(java.awt.event.MouseEvent event)
  837.     {
  838.         // to do: code goes here.
  839.              
  840.         button2_MouseClicked_Interaction1(event);
  841.     }
  842.  
  843.  
  844.     void button2_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  845.     {
  846.         updateDate((Button)event.getComponent());
  847.     }
  848.  
  849.  
  850.     void button3_MouseClicked(java.awt.event.MouseEvent event)
  851.     {
  852.         
  853.         button3_MouseClicked_Interaction1(event);
  854.     }
  855.  
  856.  
  857.     void button3_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  858.     {
  859.         updateDate((Button)event.getComponent());
  860.     }
  861.  
  862.  
  863.     void button4_MouseClicked(java.awt.event.MouseEvent event)
  864.     {
  865.         // to do: code goes here.
  866.              
  867.         button4_MouseClicked_Interaction1(event);
  868.     }
  869.  
  870.  
  871.     void button4_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  872.     {
  873.         updateDate((Button)event.getComponent());
  874.     }
  875.  
  876.  
  877.     void button5_MouseClicked(java.awt.event.MouseEvent event)
  878.     {
  879.         // to do: code goes here.
  880.              
  881.         button5_MouseClicked_Interaction1(event);
  882.     }
  883.  
  884.  
  885.     void button5_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  886.     {
  887.         updateDate((Button)event.getComponent());
  888.     }
  889.  
  890.  
  891.     void button6_MouseClicked(java.awt.event.MouseEvent event)
  892.     {
  893.         // to do: code goes here.
  894.              
  895.         button6_MouseClicked_Interaction1(event);
  896.     }
  897.  
  898.  
  899.     void button6_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  900.     {
  901.         updateDate((Button)event.getComponent());
  902.     }
  903.  
  904.  
  905.     void button7_MouseClicked(java.awt.event.MouseEvent event)
  906.     {
  907.         // to do: code goes here.
  908.              
  909.         button7_MouseClicked_Interaction1(event);
  910.     }
  911.  
  912.  
  913.     void button7_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  914.     {
  915.         updateDate((Button)event.getComponent());
  916.     }
  917.  
  918.  
  919.     void button8_MouseClicked(java.awt.event.MouseEvent event)
  920.     {
  921.         // to do: code goes here.
  922.              
  923.         button8_MouseClicked_Interaction1(event);
  924.     }
  925.  
  926.  
  927.     void button8_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  928.     {
  929.         updateDate((Button)event.getComponent());
  930.     }
  931.  
  932.  
  933.     void button9_MouseClicked(java.awt.event.MouseEvent event)
  934.     {
  935.         // to do: code goes here.
  936.              
  937.         button9_MouseClicked_Interaction1(event);
  938.     }
  939.  
  940.  
  941.     void button9_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  942.     {
  943.         updateDate((Button)event.getComponent());
  944.     }
  945.  
  946.  
  947.     void button10_MouseClicked(java.awt.event.MouseEvent event)
  948.     {
  949.         // to do: code goes here.
  950.              
  951.         button10_MouseClicked_Interaction1(event);
  952.     }
  953.  
  954.  
  955.     void button10_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  956.     {
  957.         updateDate((Button)event.getComponent());
  958.     }
  959.  
  960.  
  961.     
  962.     void button11_MouseClicked(java.awt.event.MouseEvent event)
  963.     {
  964.         // to do: code goes here.
  965.              
  966.         button11_MouseClicked_Interaction1(event);
  967.     }
  968.  
  969.  
  970.     void button11_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  971.     {
  972.         updateDate((Button)event.getComponent());
  973.     }
  974.  
  975.  
  976.     
  977.     void button12_MouseClicked(java.awt.event.MouseEvent event)
  978.     {
  979.         // to do: code goes here.
  980.              
  981.         button12_MouseClicked_Interaction1(event);
  982.     }
  983.  
  984.  
  985.     void button12_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  986.     {
  987.         updateDate((Button)event.getComponent());
  988.     }
  989.  
  990.  
  991.     
  992.     void button13_MouseClicked(java.awt.event.MouseEvent event)
  993.     {
  994.         // to do: code goes here.
  995.              
  996.         button13_MouseClicked_Interaction1(event);
  997.     }
  998.  
  999.  
  1000.     void button13_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1001.     {
  1002.         updateDate((Button)event.getComponent());
  1003.     }
  1004.  
  1005.  
  1006.  
  1007.  
  1008.     void button14_MouseClicked(java.awt.event.MouseEvent event)
  1009.     {
  1010.         // to do: code goes here.
  1011.              
  1012.         button14_MouseClicked_Interaction1(event);
  1013.     }
  1014.  
  1015.  
  1016.     void button14_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1017.     {
  1018.         updateDate((Button)event.getComponent());
  1019.     }
  1020.  
  1021.  
  1022.  
  1023.  
  1024.     void button15_MouseClicked(java.awt.event.MouseEvent event)
  1025.     {
  1026.         // to do: code goes here.
  1027.              
  1028.         button15_MouseClicked_Interaction1(event);
  1029.     }
  1030.  
  1031.  
  1032.     void button15_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1033.     {
  1034.         updateDate((Button)event.getComponent());
  1035.     }
  1036.  
  1037.  
  1038.  
  1039.  
  1040.     void button16_MouseClicked(java.awt.event.MouseEvent event)
  1041.     {
  1042.         // to do: code goes here.
  1043.              
  1044.         button16_MouseClicked_Interaction1(event);
  1045.     }
  1046.  
  1047.  
  1048.     void button16_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1049.     {
  1050.         updateDate((Button)event.getComponent());
  1051.     }
  1052.  
  1053.  
  1054.  
  1055.     void button17_MouseClicked(java.awt.event.MouseEvent event)
  1056.     {
  1057.         // to do: code goes here.
  1058.              
  1059.         button17_MouseClicked_Interaction1(event);
  1060.     }
  1061.  
  1062.  
  1063.     void button17_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1064.     {
  1065.         updateDate((Button)event.getComponent());
  1066.     }
  1067.  
  1068.  
  1069.  
  1070.     void button18_MouseClicked(java.awt.event.MouseEvent event)
  1071.     {
  1072.         // to do: code goes here.
  1073.              
  1074.         button18_MouseClicked_Interaction1(event);
  1075.     }
  1076.  
  1077.  
  1078.     void button18_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1079.     {
  1080.         updateDate((Button)event.getComponent());
  1081.     }
  1082.  
  1083.  
  1084.     void button19_MouseClicked(java.awt.event.MouseEvent event)
  1085.     {
  1086.         // to do: code goes here.
  1087.              
  1088.         button19_MouseClicked_Interaction1(event);
  1089.     }
  1090.  
  1091.  
  1092.     void button19_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1093.     {
  1094.         updateDate((Button)event.getComponent());
  1095.     }
  1096.  
  1097.  
  1098.  
  1099.     void button20_MouseClicked(java.awt.event.MouseEvent event)
  1100.     {
  1101.         // to do: code goes here.
  1102.              
  1103.         button20_MouseClicked_Interaction1(event);
  1104.     }
  1105.  
  1106.  
  1107.     void button20_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1108.     {
  1109.         updateDate((Button)event.getComponent());
  1110.     }
  1111.  
  1112.     void button21_MouseClicked(java.awt.event.MouseEvent event)
  1113.     {
  1114.         // to do: code goes here.
  1115.              
  1116.         button21_MouseClicked_Interaction1(event);
  1117.     }
  1118.  
  1119.  
  1120.     void button21_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1121.     {
  1122.         updateDate((Button)event.getComponent());
  1123.     }
  1124.  
  1125.  
  1126.  
  1127.  
  1128.     void button22_MouseClicked(java.awt.event.MouseEvent event)
  1129.     {
  1130.         // to do: code goes here.
  1131.              
  1132.         button22_MouseClicked_Interaction1(event);
  1133.     }
  1134.  
  1135.  
  1136.     void button22_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1137.     {
  1138.         updateDate((Button)event.getComponent());
  1139.     }
  1140.  
  1141.  
  1142.  
  1143.  
  1144.     void button23_MouseClicked(java.awt.event.MouseEvent event)
  1145.     {
  1146.         // to do: code goes here.
  1147.              
  1148.         button23_MouseClicked_Interaction1(event);
  1149.     }
  1150.  
  1151.  
  1152.     void button23_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1153.     {
  1154.         updateDate((Button)event.getComponent());
  1155.     }
  1156.  
  1157.  
  1158.  
  1159.     void button24_MouseClicked(java.awt.event.MouseEvent event)
  1160.     {
  1161.         // to do: code goes here.
  1162.              
  1163.         button24_MouseClicked_Interaction1(event);
  1164.     }
  1165.  
  1166.  
  1167.     void button24_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1168.     {
  1169.         updateDate((Button)event.getComponent());
  1170.     }
  1171.  
  1172.  
  1173.  
  1174.     void button25_MouseClicked(java.awt.event.MouseEvent event)
  1175.     {
  1176.         // to do: code goes here.
  1177.              
  1178.         button25_MouseClicked_Interaction1(event);
  1179.     }
  1180.  
  1181.  
  1182.     void button25_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1183.     {
  1184.         updateDate((Button)event.getComponent());
  1185.     }
  1186.  
  1187.  
  1188.     void button26_MouseClicked(java.awt.event.MouseEvent event)
  1189.     {
  1190.         // to do: code goes here.
  1191.              
  1192.         button26_MouseClicked_Interaction1(event);
  1193.     }
  1194.  
  1195.  
  1196.     void button26_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1197.     {
  1198.         updateDate((Button)event.getComponent());
  1199.     }
  1200.  
  1201.     void button27_MouseClicked(java.awt.event.MouseEvent event)
  1202.     {
  1203.         // to do: code goes here.
  1204.              
  1205.         button27_MouseClicked_Interaction1(event);
  1206.     }
  1207.  
  1208.  
  1209.     void button27_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1210.     {
  1211.         updateDate((Button)event.getComponent());
  1212.     }
  1213.  
  1214.  
  1215.     void button28_MouseClicked(java.awt.event.MouseEvent event)
  1216.     {
  1217.         // to do: code goes here.
  1218.              
  1219.         button28_MouseClicked_Interaction1(event);
  1220.     }
  1221.  
  1222.  
  1223.     void button28_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1224.     {
  1225.         updateDate((Button)event.getComponent());
  1226.     }
  1227.  
  1228.     void button29_MouseClicked(java.awt.event.MouseEvent event)
  1229.     {
  1230.         // to do: code goes here.
  1231.              
  1232.         button29_MouseClicked_Interaction1(event);
  1233.     }
  1234.  
  1235.  
  1236.     void button29_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1237.     {
  1238.     
  1239.         updateDate((Button)event.getComponent());
  1240.     }
  1241.     
  1242.  
  1243.     void button30_MouseClicked(java.awt.event.MouseEvent event)
  1244.     {
  1245.         // to do: code goes here.
  1246.              
  1247.         button30_MouseClicked_Interaction1(event);
  1248.     }
  1249.  
  1250.  
  1251.     void button30_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1252.     {
  1253.         updateDate((Button)event.getComponent());
  1254.     }
  1255.  
  1256.     void button31_MouseClicked(java.awt.event.MouseEvent event)
  1257.     {
  1258.         // to do: code goes here.
  1259.              
  1260.         button31_MouseClicked_Interaction1(event);
  1261.     }
  1262.  
  1263.  
  1264.     void button31_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1265.     {
  1266.         updateDate((Button)event.getComponent());
  1267.     }
  1268.     
  1269.  
  1270.  
  1271.     void button32_MouseClicked(java.awt.event.MouseEvent event)
  1272.     {
  1273.         // to do: code goes here.
  1274.              
  1275.         button32_MouseClicked_Interaction1(event);
  1276.     }
  1277.  
  1278.  
  1279.     void button32_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1280.     {
  1281.         updateDate((Button)event.getComponent());
  1282.     }
  1283.         
  1284.  
  1285.  
  1286.     void button33_MouseClicked(java.awt.event.MouseEvent event)
  1287.     {
  1288.         // to do: code goes here.
  1289.              
  1290.         button33_MouseClicked_Interaction1(event);
  1291.     }
  1292.  
  1293.  
  1294.     void button33_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1295.     {
  1296.         updateDate((Button)event.getComponent());
  1297.     }
  1298.         
  1299.  
  1300.  
  1301.     void button34_MouseClicked(java.awt.event.MouseEvent event)
  1302.     {
  1303.         // to do: code goes here.
  1304.              
  1305.         button34_MouseClicked_Interaction1(event);
  1306.     }
  1307.  
  1308.  
  1309.     void button34_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1310.     {
  1311.         updateDate((Button)event.getComponent());
  1312.     }
  1313.     
  1314.  
  1315.  
  1316.     void button35_MouseClicked(java.awt.event.MouseEvent event)
  1317.     {
  1318.         // to do: code goes here.
  1319.              
  1320.         button35_MouseClicked_Interaction1(event);
  1321.     }
  1322.  
  1323.  
  1324.     void button35_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1325.     {
  1326.         updateDate((Button)event.getComponent());
  1327.     }
  1328.     
  1329.  
  1330.  
  1331.     void button36_MouseClicked(java.awt.event.MouseEvent event)
  1332.     {
  1333.         // to do: code goes here.
  1334.              
  1335.         button36_MouseClicked_Interaction1(event);
  1336.     }
  1337.  
  1338.  
  1339.     void button36_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1340.     {
  1341.         updateDate((Button)event.getComponent());
  1342.     }
  1343.         
  1344.  
  1345.     void button37_MouseClicked(java.awt.event.MouseEvent event)
  1346.     {
  1347.         // to do: code goes here.
  1348.              
  1349.         button37_MouseClicked_Interaction1(event);
  1350.     }
  1351.  
  1352.  
  1353.     void button37_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1354.     {
  1355.         updateDate((Button)event.getComponent());
  1356.     }
  1357.         
  1358.  
  1359.  
  1360.     void button38_MouseClicked(java.awt.event.MouseEvent event)
  1361.     {
  1362.         // to do: code goes here.
  1363.              
  1364.         button38_MouseClicked_Interaction1(event);
  1365.     }
  1366.  
  1367.  
  1368.     void button38_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1369.     {
  1370.         updateDate((Button)event.getComponent());
  1371.     }
  1372.     
  1373.  
  1374.  
  1375.     void button39_MouseClicked(java.awt.event.MouseEvent event)
  1376.     {
  1377.         // to do: code goes here.
  1378.              
  1379.         button39_MouseClicked_Interaction1(event);
  1380.     }
  1381.  
  1382.  
  1383.     void button39_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1384.     {
  1385.         updateDate((Button)event.getComponent());
  1386.     }
  1387.         
  1388.  
  1389.     void button40_MouseClicked(java.awt.event.MouseEvent event)
  1390.     {
  1391.         // to do: code goes here.
  1392.              
  1393.         button40_MouseClicked_Interaction1(event);
  1394.     }
  1395.  
  1396.  
  1397.     void button40_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1398.     {
  1399.         updateDate((Button)event.getComponent());
  1400.     }
  1401.         
  1402.  
  1403.  
  1404.     void button41_MouseClicked(java.awt.event.MouseEvent event)
  1405.     {
  1406.         // to do: code goes here.
  1407.              
  1408.         button41_MouseClicked_Interaction1(event);
  1409.     }
  1410.  
  1411.  
  1412.     void button41_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1413.     {
  1414.         updateDate((Button)event.getComponent());
  1415.     }
  1416.     
  1417.  
  1418.     void button42_MouseClicked(java.awt.event.MouseEvent event)
  1419.     {
  1420.         // to do: code goes here.
  1421.              
  1422.         button42_MouseClicked_Interaction1(event);
  1423.     }
  1424.  
  1425.  
  1426.     void button42_MouseClicked_Interaction1(java.awt.event.MouseEvent event)
  1427.     {
  1428.         updateDate((Button)event.getComponent());
  1429.     }
  1430.         
  1431.  
  1432.