private void makeToggleButtons() {

		displaySpeedButton.setGraphic(
				new ImageView(ImageGetter.getTeXImage("Instant \\leftarrow Step")));
		modeButton.setGraphic(
				new ImageView(ImageGetter.getTeXImage("Compact \\leftarrow Full")));
		displayResponseSpeedButton.setGraphic(
				new ImageView(ImageGetter.getTeXImage("Batch \\leftarrow Dynamic")));

		toggleButtonRow.getChildren().addAll(displayResponseSpeedButton, modeButton);
		displayResponseSpeedButton.setOnAction(new EventHandler<ActionEvent>() {
			@Override
			public void handle(ActionEvent e) {
				if (outputResponseSpeed.equals("Batch")) {
					outputResponseSpeed = "Dynamic";
					displayResponseSpeedButton.setGraphic(
							new ImageView(ImageGetter.getTeXImage("Batch \\rightarrow Dynamic")));
					submitExpression(false);
				} else {
					outputResponseSpeed = "Batch";
					displayResponseSpeedButton.setGraphic(
							new ImageView(ImageGetter.getTeXImage("Batch \\leftarrow Dynamic")));
				}
				expression.requestFocus();
				expression.deselect();
				expression.positionCaret(caretLocation);
			}
		});

		modeButton.setOnAction(new EventHandler<ActionEvent>() {
			@Override
			public void handle(ActionEvent e) {
				if (outputMode.equals("Full")) {
					outputMode = "Compact";
					modeButton.setGraphic(
							new ImageView(ImageGetter.getTeXImage("Compact \\leftarrow Full")));
				} else {
					outputMode = "Full";
					modeButton.setGraphic(
							new ImageView(ImageGetter.getTeXImage("Compact \\rightarrow Full")));
				}
				submitExpression(false);
				expression.requestFocus();
				expression.deselect();
				expression.positionCaret(caretLocation);
			}
		});
		toggleButtonRow.setSpacing(14);
		toggleButtonRow.setPadding(new Insets(0, 0, 7, 0));
	}