1 16 17 package de.schlichtherle.key.passwd.swing; 18 19 24 public class RemoteControlThread extends Thread { 25 private final RemoteControl rc; 26 27 public RemoteControlThread(final String id) { 28 this(new RemoteControl(id)); 29 } 30 31 public RemoteControlThread(RemoteControl rc) { 32 super(rc, "Remote Control Thread for \"" + rc.id + "\""); 33 this.rc = rc; 34 } 37 38 42 public Throwable getThrowable() { 43 return rc.throwable; 44 } 45 46 public void run() { 47 super.run(); 48 final Throwable t = getThrowable(); 49 if (t != null) 50 t.printStackTrace(); 51 } 52 } | Popular Tags |