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