private void addTileBars() {
		int yOffset = 0;
		int firstButtonPosition = 127;
		int firstTileBarPosition = 25;
		int tileBarHeight = 100;
		int buttonHeight = 23;
		
		//Adds a line between bars.
		JPanel inititalDivider = new JPanel();
		inititalDivider.setBounds(0, 0, 1600, 1);
		inititalDivider.setBackground(Color.BLACK);
		tileBarPanel.add(inititalDivider);
		for(int i = 0;i < repository.size();i++){
			//Create a tileBarView for the book.
			JScrollPane tileBarView = new JScrollPane();
			tileBarView.setBounds(10, firstTileBarPosition+yOffset, 1250, tileBarHeight);
			tileBarPanel.add(tileBarView);
			tileBarView.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
			tileBarView.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
			tileBarPanels.add(tileBarView);
			
			//Create a text for the book name.
			JEditorPane title = new JEditorPane("text/html", "");
			Font font = UIManager.getFont("Label.font");
	        String bodyRule = "body { font-family: " + font.getFamily() + "; " + "font-size: " + font.getSize() + "pt; }";
	        ((HTMLDocument)title.getDocument()).getStyleSheet().addRule(bodyRule);
			title.setBounds(10, 5+yOffset, 1260, 20);
			title.setText("<html><b>Title:</b> "+repository.get(i).getTitle() + " <b>Author:</b> "+ repository.get(i).getAuthor()+"</html>");
			title.setBackground(UIManager.getColor("Panel.background"));
			tileBarPanel.add(title);
			
			//Create a magnify button for the tilebar.
			JButton btnMagnifyRevert = new JButton("Magnify");
			btnMagnifyRevert.setBounds(10, firstButtonPosition+yOffset, 90, buttonHeight);
			magnifyRevertButtons.add(btnMagnifyRevert);
			keepTrackIfMagnifyRevertWasAlreadyPressed.add(new SettableBoolean(false));
			tileBarPanel.add(btnMagnifyRevert);
			
			//Generates a graph based off of the selected tiles.
			JButton btnGenerateGraph = new JButton("Graph");
			btnGenerateGraph.setBounds(110, firstButtonPosition+yOffset, 90, buttonHeight);
			generateGraphButtons.add(btnGenerateGraph);
			tileBarPanel.add(btnGenerateGraph);
			
			//Adds a line between bars.
			JPanel divider = new JPanel();
			divider.setBounds(0, firstTileBarPosition+tileBarHeight+(firstButtonPosition - (tileBarHeight+firstTileBarPosition))+buttonHeight+yOffset+2, 1600, 1);
			divider.setBackground(Color.BLACK);
			tileBarPanel.add(divider);
			
			btnGenerateGraph.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					int i = 0;
					for(i = 0;i < generateGraphButtons.size();i++){
						if(e.getSource() == generateGraphButtons.get(i)){
							break;
						}
					}
					transitionToThirdLevel(i);
				}
			});
			
			btnMagnifyRevert.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					//Based off of the selected chapters, generate the new zoomed in tilebar.
					int i = 0;
					for(i = 0;i < magnifyRevertButtons.size();i++){
						if(e.getSource() == magnifyRevertButtons.get(i)){
							break;
						}
					}
					if(keepTrackIfMagnifyRevertWasAlreadyPressed.get(i).getBoolean() == false){
						keepTrackIfMagnifyRevertWasAlreadyPressed.get(i).setBoolean(true);
						magnifyRevertButtons.get(i).setText("Revert");
						tileBarViews.get(i).generateMagnifiedTileBar(selectedChapters.get(i));
						updateTileBarInterface();
					}
					else {
						keepTrackIfMagnifyRevertWasAlreadyPressed.get(i).setBoolean(false);
						magnifyRevertButtons.get(i).setText("Magnify");
						resetTileBar(i);
						for(int j = 0;j < selectedChapters.get(i).size();j++){
							tileBarViews.get(i).setSelected(selectedChapters.get(i).get(j));
						}
						updateTileBarInterface();
					}
	            }
	        });
			yOffset += 155;
		}
	}