public EventCalendar(String title)
	{
		super();

		// Construct the panels which make up the dialog
		p1 = new JPanel();
		p2 = new JPanel(new GridLayout(7, 7));

		JButton confirmButton = new JButton("OK");

		add(p1, BorderLayout.NORTH);
		add(p2, BorderLayout.CENTER);
		add(confirmButton, BorderLayout.SOUTH);

		// Access the date format symbols for the default locale
		DateFormatSymbols dfs = new DateFormatSymbols();

		// Build the lMonths combo box
		String[] months = dfs.getMonths();
		lMonths = new JComboBox(months);

		// Set the selected month
		lMonths.setSelectedIndex(cd.get(Calendar.MONTH));

		// Build the lYears combo box
		String[] years;
		years = new String[mNumberOfYears];

		for (int y = mStartYear; y < mEndYear; y++)
		{
			years[y - mStartYear] = new Integer(y).toString();
		}

		lYears = new JComboBox(years);

		// Set the selected year
		lYears.setSelectedIndex(cd.get(Calendar.YEAR) - mStartYear);

		// Add a listener for when the month changes
		lMonths.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent e)
			{
				if (lMonths.getSelectedIndex() < 12) // Because DateFormatStrings.getMonths returns 13 entries!
				{
					cd.set(Calendar.MONTH, lMonths.getSelectedIndex());
					populateButtons();
				}
				else
				{
					lMonths.setSelectedIndex(cd.get(Calendar.MONTH));
				}
			}
		});

		// Add a listener for when the year changes
		lYears.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent e)
			{
				cd.set(Calendar.YEAR, lYears.getSelectedIndex() + mStartYear);
				populateButtons();
			}
		});

		// Add the months and years combo boxes to the dialog
		p2.add(lMonths);
		p2.add(lYears);

		// Add the seven day names
		String[] weekdays = dfs.getShortWeekdays();

		p3.add(new JLabel(weekdays[1], SwingConstants.CENTER));
		p3.add(new JLabel(weekdays[2], SwingConstants.CENTER));
		p3.add(new JLabel(weekdays[3], SwingConstants.CENTER));
		p3.add(new JLabel(weekdays[4], SwingConstants.CENTER));
		p3.add(new JLabel(weekdays[5], SwingConstants.CENTER));
		p3.add(new JLabel(weekdays[6], SwingConstants.CENTER));
		p3.add(new JLabel(weekdays[7], SwingConstants.CENTER));

		// Add buttons for each of the possible dates

		mButtons = new EventCalendarButton[42];

		for (int i = 0; i < 42; i++)
		{
			mButtons[i] = new EventCalendarButton();
			p3.add(mButtons[i]);
			mButtons[i].addActionListener(new ActionListener()
			{
				public void actionPerformed(ActionEvent e)
				{
				}
			});
		}
		// populate the button labels with day numbers
		populateButtons();
	}