public ProcessTextArea(final JTextArea area, ProcessBuilder processBuilder) {
		super(area);
		this.processBuilder = processBuilder;

		close = new JButton("Terminate");
		close.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				closeProcess();
			}
		});
		addToolbarComponent(close);

		rerun = new JButton("Rerun");
		rerun.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				closeProcess();
				startProcess();
			}
		});
		addToolbarComponent(rerun);

		area.addKeyListener(new KeyAdapter() {
			private StringBuilder inputBuilder = new StringBuilder();

			public void keyPressed(KeyEvent evt) {
				try {
					if (!finished) {
						int keyCode = evt.getKeyCode();
						if (keyCode == KeyEvent.VK_ENTER) {
							out.append(inputBuilder.toString());
							out.append(evt.getKeyChar());
							inputBuilder.delete(0, inputBuilder.length());
							out.flush();
						} else if (keyCode == KeyEvent.VK_BACK_SPACE) {
							if (inputBuilder.length() > 0)
								inputBuilder.deleteCharAt(inputBuilder.length() - 1);
						} else if (keyCode != KeyEvent.VK_SHIFT && keyCode != KeyEvent.VK_ALT
								&& keyCode != KeyEvent.VK_CAPS_LOCK) {
							inputBuilder.append(evt.getKeyChar());
						}
					}
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		});
		startProcess();
	}