private void init() {
        setLayout(new AbsoluteLayout());
        this.setMinimumSize(new Dimension(161, 226));
        this.setMaximumSize(getMinimumSize());
        this.setPreferredSize(getMinimumSize());
        this.setBorder(new BorderUIResource.EtchedBorderUIResource());

        backButton.setFont(smallFont);
        backButton.setText("<");
        backButton.setMargin(insets);
        backButton.setDefaultCapable(false);
        backButton.addActionListener(new ActionListener() {
            public void actionPerformed(final ActionEvent evt) {
                onBackClicked(evt);
            }
        });
        add(backButton, new AbsoluteConstraints(10, 10, 20, 20));

        monthAndYear.setFont(largeFont);
        monthAndYear.setHorizontalAlignment(JTextField.CENTER);
        monthAndYear.setText(formatDateText(selectedDate.getTime()));
        add(monthAndYear, new AbsoluteConstraints(30, 10, 100, 20));

        forwardButton.setFont(smallFont);
        forwardButton.setText(">");
        forwardButton.setMargin(insets);
        forwardButton.setDefaultCapable(false);
        forwardButton.addActionListener(new ActionListener() {
            public void actionPerformed(final ActionEvent evt) {
                onForwardClicked(evt);
            }
        });
        add(forwardButton, new AbsoluteConstraints(130, 10, 20, 20));

        // layout the column headings for the days of the week
        int x = startX;
        for (int ii = 0; ii < dayHeadings.length; ii++) {
            dayHeadings[ii].setBackground(gray);
            dayHeadings[ii].setEditable(false);
            dayHeadings[ii].setFont(smallFont);
            dayHeadings[ii].setHorizontalAlignment(JTextField.CENTER);
            dayHeadings[ii].setFocusable(false);
            add(dayHeadings[ii], new AbsoluteConstraints(x, 40, 21, 21));
            x += 20;
        }

        // layout the days of the month
        x = startX;
        int y = startY;
        for (int ii = 0; ii < daysInMonth.length; ii++) {
            for (int jj = 0; jj < daysInMonth[ii].length; jj++) {
                daysInMonth[ii][jj].setBackground(gray);
                daysInMonth[ii][jj].setEditable(false);
                daysInMonth[ii][jj].setFont(smallFont);
                daysInMonth[ii][jj].setHorizontalAlignment(JTextField.RIGHT);
                daysInMonth[ii][jj].setText("");
                daysInMonth[ii][jj].setFocusable(false);
                daysInMonth[ii][jj].addMouseListener(new MouseAdapter() {
                    public void mouseClicked(final MouseEvent evt) {
                        onDayClicked(evt);
                    }
                });
                add(daysInMonth[ii][jj], new AbsoluteConstraints(x, y, 21, 21));
                x += 20;
            }
            x = startX;
            y += 20;
        }

        initButtons(true);

        calculateCalendar();
    }