public GradingToolbar(final DisplayTabsPane displayPanels, InteractTabsPane interactPanels) {
		this.setFloatable(false);
		displayPanes = displayPanels;
		interactTabs = interactPanels;
		compile = new JButton("Compile");
		compile.setEnabled(false);

		compile.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent arg0) {
				if (compileFocus != null) {
					String result = compileFocus.compile();
					if (result != null) {
						JOptionPane.showMessageDialog(compile, "Did not compile. See IO tab.", "Compilation Error",
								JOptionPane.ERROR_MESSAGE);
						System.err.print(result);
						interactTabs.setSelectedIndex(interactTabs.getTabCount() >= 2 ? 1 : 0);
					} else {
						System.out.println(compileFocus.getName() + " compiled succesfully");
						updateButtonState();

					}
				}
			}
		});
		run = new JButton("Run");

		run.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent arg0) {
				if (compileFocus != null) {
					CompiledSmartFile compiled = compileFocus.checkForCompiledFile();
					if (compiled != null) {
						ProcessBuilder builder = compiled.getRunProcessBuilder();
						ProcessTextArea processPane = new ProcessTextArea(new JTextArea(), builder);
						interactTabs.addProcessTab(processPane, compiled.getName());
					}
				}
			}
		});
		run.setEnabled(false);
		add(compile);
		add(run);

		addSeparator();

		seperateGrading = new JButton("Seperate Grading Panel");
		seperateGrading.addActionListener(new ActionListener() {
			boolean seperated = false;

			@Override
			public void actionPerformed(ActionEvent arg0) {
				interactTabs.toggleGradingSeperation();
				seperated = !seperated;
				seperateGrading.setText(seperated ? "Tab Grading Panel" : "Seperate Grading Panel");
			}

		});
		add(seperateGrading);
		addSeparator();
		openPDF = new FileGetterButton("Open Grading Guide");
		openPDF.setFileFilter(new FileFilter() {

			@Override
			public boolean accept(File file) {
				return !file.getName().contains(".") || file.getName().endsWith(".pdf");
			}

			@Override
			public String getDescription() {
				return "PDF Files";
			}

		});
		openPDF.addFileChangeListener(new FileChangeListener() {

			@Override
			public void onFileChange(File newFile) {
				try {
					displayPanes.addPDF(newFile);
				} catch (PdfException e) {
					e.printStackTrace();
				}
			}
		});
		add(openPDF);
		displayPanes.addChangeListener(new DisplayChangeListener());

	}