static class LogView extends JScrollPane { JTextArea textArea; *() { textArea = new JTextArea; textArea.setEditable(false); setViewportView(textArea); } // thread safe public void logText(final String text) { awt { textArea.append(text); // todo: scroll? } } // thread safe void print(String text) { logText(text); } // log some pure text and add a line feed // thread safe public void println(String line) { logText(line + "\n"); } // thread safe public void clear() { awt { textArea.setText(""); } } }