The Gobbler will be used to consume the Process' output and error streams. You would have to modify it to append the data into your text area. A BufferedReader could definitely be used here. A couple things to point out:
- You should have two separate gobblers, one for the output and one for the error streams.
- The gobblers should each run in their own
thread. They should push the text field update into the swing event thread, maybe using SwingUtilities
The input doesn't really need a gobbler or its own thread. You would have an input source on your GUI and an event listener for when the input is made. Then you would pipe the text the user entered into the Process' input stream.