+ // We want to update GUI on the AWT event dispatching thread, but we can't stop
+ // the resolve from that thread, since stop() is synchronized with this callback.
+ // So, we stop the resolve on this thread, then invokeAndWait on the AWT event thread.
+
+ resolver.stop();
+
+ hostNameForUpdate = hostName;
+ portForUpdate = port;
+
+ try {
+ SwingUtilities.invokeAndWait(this);
+ }
+ catch ( Exception e)
+ {
+ e.printStackTrace();
+ }