示例#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);
 }
示例#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);
 }