public void addCalendar(boolean weekView, Date date)
	{
		JPanel container = new JPanel();

		FlowLayout panelLayout = new FlowLayout();
		panelLayout.setHgap(0);
		panelLayout.setVgap(0);
		container.setLayout(panelLayout);

		scrollPane = new JScrollPane(container);

		if (weekView == true)
		{
			int width = 100;
			int height = 1000;

			Date d = date;
			Calendar cal = Calendar.getInstance();
			cal.setTime(d);
			// cal.add(Calendar.DATE, -1);
			// d = cal.getTime();

			for (int i = 0; i < 7; i++)
			{
				CalendarPanel p;
				if (i == 0)
				{
					p = new CalendarPanel(d, true, true, width, height);
				}
				else if (i == 6)
				{
					p = new CalendarPanel(d, false, false, width, height);
				}
				else
				{
					p = new CalendarPanel(d, false, true, width, height);
				}

				cal.add(Calendar.DATE, 1);
				d = cal.getTime();

				cpanels.add(p);
				container.add(p);
			}
		}
		else
		{
			int width = 700;
			int height = 1000;

			CalendarPanel p = new CalendarPanel(date, true, false, width,
					height);

			cpanels.add(p);
			container.add(p);
		}

		scrollPane.setPreferredSize(new Dimension(730, 490));
		if (lastScrollPosition != null)
		{
			scrollPane.getViewport().setViewPosition(lastScrollPosition);
		}

		calendarContainer.add(scrollPane, BorderLayout.SOUTH);
	}