private void append(String string) { final String s = new String(string); Runnable appendString = new Runnable() { public void run() { textPane.append(s); } }; SwingUtilities.invokeLater(appendString); }
private void setMessage(String string) { final String s = new String(string); Runnable setString = new Runnable() { public void run() { message.setText(s); } }; SwingUtilities.invokeLater(setString); }