Read on Concurrency in Swing, and create a SwingWorker for your background processes (reading and writing to your port), then when you read a line in from the port, pass the String into the SwingWorker's publish method, and in the process method, append it to your JTextArea. The tutorial and API will help you get started.