private void initPanel() {
		JPanel p = new JPanel();
		p.setLayout(null);
		for (int i=0;i<7;i++){
			createLabel(p,i);
			createTextField(p,i);
		}

		// Add confirm button
		JButton confirmButton = new JButton("Confirm");
		confirmButton.setBounds(WIDTH/4, 9*HEIGHT/11, WIDTH/2, HEIGHT/13);
		confirmButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e)
			{
				String year = textFields.get(6).getText().trim();
				
				if (!isNumeric(year)) {
					popMsg("Year needs to be a number!");
					return;
				}
				
				for (int i = 1; i <= 5; i++) {
					String text = textFields.get(i).getText().trim();
					if (text.equals("")) {
						popMsg("A field is missing!");
						return;
				}
				}
				
				//Execute when button is pressed
				Book b = new Book(
						textFields.get(1).getText().trim(),
						textFields.get(2).getText().trim(),
						textFields.get(3).getText().trim(),
						textFields.get(4).getText().trim(),
						textFields.get(5).getText().trim(),
						Integer.parseInt(year));
				
				BookCopy bcUpdate = new BookCopy(
						textFields.get(1).getText().trim(),
						1, "in");
				System.out.println("Book has been created");
				String callNumber = b.getCallNumber();
				Integer countBook = 0;
				try {
					countBook = LibraryDB.getManager().countBook(callNumber);
				} catch (SQLException e2) {
					// TODO Auto-generated catch block
					determineError(e2);
				}
				if (countBook > 0) { // returns true if book exists
						try {
							Integer countBookCopy = LibraryDB.getManager().countBookCopy(callNumber);
							System.out.println(countBookCopy);
							BookCopy bc = new BookCopy(b.getCallNumber(), countBookCopy + 1, "in"); // insert book copy instead
							LibraryDB.getManager().insertBookCopy(bc);
							System.out.println("This is happening 1");
							exitWindow();
							System.out.println("Submit book copy");
						} catch (SQLException e1) { 
							determineError(e1);
						}
					}
					else {
						try {
							System.out.println("We are trying!");
							LibraryDB.getManager().insertBook(b); // just insert the book if callnumber doesnt exist
							// Jimmy: Not quite, we do need to insert a bookcopy. 
							// A Book isn't exactly a physical object, it's just a call number
							// A bookcopy is, when we add a new book(which really means bookcopy), check if it currently exists
							// If not, then add a record for the new callnumber (in book) and then add the new physical book (bookcopy)
							
							
							// Jimmy responding to your comment, I commented it out, but you might not have noticed the change when
							// you were pushing
							
							// So yeah, I was saying this line SHOULD BE HERE because we do want to make a new tuple for bookcopy. 
							LibraryDB.getManager().insertBookCopy(bcUpdate);
							exitWindow();
							System.out.println("Submit book");
							} catch (SQLException e1) { 
								determineError(e1);
							}
					}
				}


			
		});
		JButton backButton = new JButton("Back");		
		backButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e)
			{
				new UserFrame();
				//lf.dispose();
			}
		});
		p.add(backButton);
		p.add(confirmButton);
		this.add(p);
		
		
	}