protected JPanel createDaysGUI() {
        JPanel daysGrid = new JPanel(true);
        daysGrid.setLayout(new GridLayout(0, dayName.length));

        // What day is today in case we need to highlight it
        Calendar today = Calendar.getInstance();
        int todayMonth = today.get(Calendar.MONTH);
        int todayYear = today.get(Calendar.YEAR);
        int todayDay = today.get(Calendar.DAY_OF_MONTH);

        // The start of the month
        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.MONTH, month);
        calendar.set(Calendar.YEAR, year);
        calendar.set(Calendar.DAY_OF_MONTH, 1);

        // Use this to go through all the days of the month
        Calendar iterator = (Calendar) calendar.clone();
        iterator.add(Calendar.DAY_OF_MONTH,
                -(iterator.get(Calendar.DAY_OF_WEEK) - 1));

        // The end of the month, so we don't display more than we should
        Calendar maximum = (Calendar) calendar.clone();
        maximum.add(Calendar.MONTH, +1);

        // Add the weekdays to the calendar
        for (int i = 0; i < dayName.length; i++) {
            JPanel dPanel = new JPanel(true);
            JLabel date = new JLabel(dayName[i]);
            dPanel.add(date);
            daysGrid.add(dPanel);
        }

        int count = 0;
        int limit = dayName.length * 6;

        // Create and add all buttons of the dates to the calendar
        while (iterator.getTimeInMillis() < maximum.getTimeInMillis()) {
            int lMonth = iterator.get(Calendar.MONTH);
            int lYear = iterator.get(Calendar.YEAR);

            JPanel dPanel = new JPanel(true);
            JButton dayLabel = new JButton();
            dayLabel.setForeground(Color.BLACK);
            dayLabel.setContentAreaFilled(false);
            dayLabel.setBorderPainted(false);
            Listeners l = new Listeners();
            dayLabel.addActionListener(l);

            if ((lMonth == month) && (lYear == year)) {
                int lDay = iterator.get(Calendar.DAY_OF_MONTH);
                dayLabel.setText(Integer.toString(lDay));
                dayLabel.setActionCommand(Integer.toString(lYear) + " " + Integer.toString(lMonth) + " " + Integer.toString(lDay));
                if ((todayMonth == month) && (todayYear == year) && (todayDay == lDay)) {
                    dPanel.setBackground(Color.YELLOW);
                }
            } else {
                dayLabel.setText(" ");
            }
            dPanel.add(dayLabel);
            daysGrid.add(dPanel);
            iterator.add(Calendar.DAY_OF_YEAR, +1);
            count++;
        }

        // Add blanks where needed
        for (int i = count; i < limit; i++) {
            JPanel dPanel = new JPanel(true);
            JLabel dayLabel = new JLabel();
            dayLabel.setText(" ");
            dPanel.add(dayLabel);
            daysGrid.add(dPanel);
        }
        return daysGrid;
    }