AgendaViewFrame() {

            innerPanel = new JPanel(new GridLayout(1, 9));

            JLabel toLabel = new JLabel("to", JLabel.CENTER);
            JPanel toPanel = new JPanel(new BorderLayout());
            toPanel.add(toLabel, BorderLayout.CENTER);

            String[] months = {"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"};
            startMonthsPicker = new JComboBox(months);
            startMonthsPicker.setSelectedIndex(agendaController.getCurMonth());
            endMonthPicker = new JComboBox(months);
            endMonthPicker.setSelectedIndex(agendaController.getCurMonth());

            String[] days = new String[31];
            for (int i = 0; i < days.length; i++) {
                days[i] = (i + 1) + "";
            }
            startDaysPicker = new JComboBox(days);
            startDaysPicker.setSelectedIndex(agendaController.getCurDay() - 1);
            endDayPicker = new JComboBox(days);
            endDayPicker.setSelectedIndex(agendaController.getCurDay() - 1);

            String[] years = new String[120];
            for (int i = 0; i < years.length; i++) {
                years[i] = (i + 1900) + "";
            }
            startYearPicker = new JComboBox(years);
            startYearPicker.setSelectedIndex(years.length - 7);
            endYearPicker = new JComboBox(years);
            endYearPicker.setSelectedIndex(years.length - 7);

            errorMsg = new JLabel("   ", JLabel.CENTER);
            errorMsg.setForeground(Color.red);

            JButton submitButton = new JButton("Search");
            submitButton.addActionListener(this);

            innerPanel.add(startMonthsPicker);
            innerPanel.add(startDaysPicker);
            innerPanel.add(startYearPicker);
            innerPanel.add(toPanel);
            innerPanel.add(endMonthPicker);
            innerPanel.add(endDayPicker);
            innerPanel.add(endYearPicker);
            innerPanel.add(submitButton);

            this.setLayout(new BorderLayout());
            innerPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
            add(innerPanel, BorderLayout.CENTER);
            add(errorMsg, BorderLayout.SOUTH);
            setTitle("Select agenda period");
            pack();
            setVisible(true);
        }