private void transitionForwardToSecondLevel(){
		//Remove the prior level from the interface.
		contentPane = new JPanel();
		firstLevelInterface = theFrame.getContentPane();
		theFrame.setContentPane(contentPane);
		contentPane.setLayout(null);
		
		tileBarPanel = new JScrollPane();
		tileBarPanel.setViewportBorder(null);
		tileBarPanel.setBounds(0, 0, 1284, 762);
		contentPane.add(tileBarPanel);
		tileBarPanel.setLayout(null);
		
		//Add the search boxes.
		addTextFields();
		
		//Add search button.
		JButton queryButton = new JButton("Search");
		queryButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				if(visualizationLevel == 2){
					queryForTileBars();
				}
				else if(visualizationLevel == 3){
					
				}
			}
		});
		queryButton.setBounds(1444, 130, 90, 23);
		contentPane.add(queryButton);
		
		//Add a check box for inverse coloring.
		inverseColoring = new JCheckBox("Inverse Coloring");
		inverseColoring.setBounds(1319, 262, 105, 23);
		contentPane.add(inverseColoring);
		inverseColoring.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(inverseColoring.isSelected()){
					coloringMode = 3;
					tileBarViews.clear();
					for(int i = 0;tileBarPanels.size() > i;i++){
						tileBarViews.add(new TileBarView(repository.get(i), i, thisInstance, USE_CHAPTER_FREQUENCY_COLORING, coloringMode, 20, 20, redQueryList.get(i), greenQueryList.get(i), blueQueryList.get(i), redQueryStrings.get(i), greenQueryStrings.get(i), blueQueryStrings.get(i)));
						for(int j = 0;j < selectedChapters.get(i).size();j++){
							tileBarViews.get(i).setSelected(selectedChapters.get(i).get(j));
						}
						if(keepTrackIfMagnifyRevertWasAlreadyPressed.get(i).getBoolean() == true){
							tileBarViews.get(i).generateMagnifiedTileBar(selectedChapters.get(i));
						}
					}
					updateTileBarInterface();
				}
				else {
					coloringMode = 2;
					tileBarViews.clear();
					for(int i = 0;tileBarPanels.size() > i;i++){
						tileBarViews.add(new TileBarView(repository.get(i), i, thisInstance, USE_CHAPTER_FREQUENCY_COLORING, coloringMode, 20, 20, redQueryList.get(i), greenQueryList.get(i), blueQueryList.get(i), redQueryStrings.get(i), greenQueryStrings.get(i), blueQueryStrings.get(i)));
						for(int j = 0;j < selectedChapters.get(i).size();j++){
							tileBarViews.get(i).setSelected(selectedChapters.get(i).get(j));
						}
						if(keepTrackIfMagnifyRevertWasAlreadyPressed.get(i).getBoolean() == true){
							tileBarViews.get(i).generateMagnifiedTileBar(selectedChapters.get(i));
						}
					}
					updateTileBarInterface();
				}
            }
		});
		
		//Add a back button.
		JButton btnBack = new JButton("Back");
		btnBack.setBounds(1334, 212, 90, 23);
		btnBack.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(visualizationLevel == 2){
					theFrame.getContentPane().removeAll();
					theFrame.getContentPane().add(firstLevelInterface);
					theFrame.revalidate();
					theFrame.repaint();
				}
				else if(visualizationLevel == 3) {
					transitionBackToSecondLevel();
				}
            }
		});
		contentPane.add(btnBack);
		
		//Add a checkbox to make the visualization optional.
		chckbxVisualization = new JCheckBox("Visualization");
		chckbxVisualization.setBounds(1444, 262, 85, 23);
		chckbxVisualization.setSelected(true);
		chckbxVisualization.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(!chckbxVisualization.isSelected()){
					if(visualizationLevel == 2){
						theFrame.getContentPane().remove(tileBarPanel);
						tileBarPanel.setEnabled(false);
						theFrame.getContentPane().add(tileBarTextPane);
						tileBarTextPane.setEnabled(true);
					}
					else {
						theFrame.getContentPane().remove(forceDirectedNetwork);
						forceDirectedNetwork.setEnabled(false);
						theFrame.getContentPane().add(graphTextPane);
						graphTextPane.setEnabled(true);
					}
					theFrame.revalidate();
					theFrame.repaint();
				}
				else {
					if(visualizationLevel == 2){
						theFrame.getContentPane().remove(tileBarTextPane);
						tileBarTextPane.setEnabled(false);
						theFrame.getContentPane().add(tileBarPanel);
						tileBarPanel.setEnabled(true);
					}
					else {
						theFrame.getContentPane().remove(graphTextPane);
						graphTextPane.setEnabled(false);
						theFrame.getContentPane().add(forceDirectedNetwork);
						forceDirectedNetwork.setEnabled(true);
					}
					theFrame.revalidate();
					theFrame.repaint();
				}
            }
		});
		contentPane.add(chckbxVisualization);
		
		JButton btnReferenceImage = new JButton("Reference");
		btnReferenceImage.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e){
				ReferenceImage img = new ReferenceImage();
				JFrame newFrame = new JFrame();
				newFrame.getContentPane().add(img);
				newFrame.pack();
				newFrame.setSize(new Dimension(333, 298+38-14));
				newFrame.setResizable(false);
				newFrame.setVisible(true);
			}
		});
		btnReferenceImage.setBounds(1444, 212, 90, 23);
		contentPane.add(btnReferenceImage);
		
		JPanel panel = new JPanel();
		panel.setBackground(Color.BLACK);
		panel.setBounds(1284, 200, 300, 1);
		contentPane.add(panel);
		
		JPanel panel_1 = new JPanel();
		panel_1.setBackground(Color.BLACK);
		panel_1.setBounds(1284, 250, 300, 1);
		contentPane.add(panel_1);
		
		JPanel panel_2 = new JPanel();
		panel_2.setBackground(Color.BLACK);
		panel_2.setBounds(1284, 299, 300, 1);
		contentPane.add(panel_2);
		
		JTextPane textInformation = new JTextPane();
		textInformation.setBounds(1284, 300, 300, 462);
		contentPane.add(textInformation);
		
		JPanel panel_4 = new JPanel();
		panel_4.setBackground(Color.BLACK);
		panel_4.setBounds(1284, 300, 300, 1);
		contentPane.add(panel_4);
		
		//Add the actual tilebars to the visualization.
		addTileBars();
		
		//Generate black ones.
		generateBlankTileBars();
	}