@SuppressWarnings("unchecked")
	WeekView(JFrame parent){
		first = false;
		// Sets look to that of the OS
		try {
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		}
		catch (ClassNotFoundException e) {

		}
		catch (InstantiationException e) {

		}
		catch (IllegalAccessException e) {

		}
		catch (UnsupportedLookAndFeelException e) {

		}
		// Setting up of basic calendar attributes
		theParent = parent;
		mainFrame = new JFrame("Week View");
		month = new JLabel("Week of September 29th");
		month.setFont(new Font("Serif", Font.PLAIN, 18));
		prev = new JButton("<-");
		next = new JButton("->");
		backToMain = new JButton("Return to Menu");
		calendarTable = new DefaultTableModel()
		{
			public boolean isCellEditable(int rowIndex, int mColIndex)
			{
				return false;
			}
		};
		theCalendar = new JTable(calendarTable);
		calendarScroll = new JScrollPane(theCalendar);
		calendarPanel = new JPanel(null);
		mainFrame.setSize(900,750);
		thePane = mainFrame.getContentPane();
		thePane.setLayout(null);
		mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		calendarPanel.setBorder(BorderFactory.createTitledBorder("Calendar"));
		thePane.add(calendarPanel);
		calendarPanel.add(month);
		calendarPanel.add(prev);
		calendarPanel.add(next);
		calendarPanel.add(calendarScroll);
		calendarPanel.add(backToMain);
		// Sets bounds of many attributes of the calendar
		calendarPanel.setBounds(0, 0, 873, 670);
		month.setBounds(320-month.getPreferredSize().width/2, 50, 200, 50);
		prev.setBounds(20, 50, 100, 50);
		next.setBounds(721, 50, 100, 50);
		calendarScroll.setBounds(20, 100, 800, 500);
		backToMain.setBounds(345, 610, 160, 40);
		mainFrame.setResizable(false);
		mainFrame.setVisible(true);
		// Creates calendar to allow for correct day population
		GregorianCalendar gregCal = new GregorianCalendar();
		theDay = gregCal.get(GregorianCalendar.DAY_OF_MONTH);
		theMonth = gregCal.get(GregorianCalendar.MONTH);
		theYear = gregCal.get(GregorianCalendar.YEAR);
		otherDay = theDay;
		otherMonth = theMonth;
		otherYear = theYear;
		// Array that holds days of the week
		theCalendar.setFont(new Font("Serif", Font.PLAIN, 18));
		String[] days = {"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
		for (int i = 0; i < 7; i++){
			calendarTable.addColumn(days[i]);
		}
		// More various settings
		theCalendar.getParent().setBackground(theCalendar.getBackground());
		theCalendar.getTableHeader().setResizingAllowed(false);
		theCalendar.getTableHeader().setReorderingAllowed(false);
		theCalendar.setColumnSelectionAllowed(true);
		theCalendar.setRowSelectionAllowed(true);
		theCalendar.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
		theCalendar.setRowHeight(456);
		calendarTable.setColumnCount(7);
		calendarTable.setRowCount(1);
		// Adds listeners to the week view
		prev.addActionListener(new prevWeek());
		next.addActionListener(new nextWeek());
		backToMain.addActionListener(new backToMenu());
		final StoreData data = new StoreData();
		// Listener that is added to each cell for a day
		theCalendar.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent clicked) {
				SendToDB newRun = new SendToDB();
				int row = theCalendar.rowAtPoint(clicked.getPoint());
				int col = theCalendar.columnAtPoint(clicked.getPoint());
				if (row >= 0 && col >= 0) {
					String selectedData = null;
					String selectedMonth = null;
					selectedData = (String) theCalendar.getValueAt(row, col);
					selectedMonth = selectedData.substring(6,8);
					selectedData = selectedData.substring(9, 11);
					if(otherMonth < 10){
						data.setDate("0"+selectedMonth+"-"+selectedData+"-"+otherYear);
					}else{
						data.setDate(""+selectedMonth+"-"+selectedData+"-"+otherYear);
					}
					newRun.runStore(data, 5);
					// Shows the empty day dialog
					if(data.getSingleDay().size() == 0){
						EmptyDay newEmpty = new EmptyDay(data,theParent,data.getSingleDay().size());
						// Shows the events for a day
					}else{
						DayView newDay = new DayView(data,theParent,data.getSingleDay().size());
					}
				}
			}
		});
		updateCalendar(theDay, theMonth, theYear);
	}