port = ((InetSocketAddress) address).getPort();
}
}
String user = rbm.getProxyUserName();
char[] pw = rbm.getProxyPassword();
WebProxyDialog dlg;
if (parent instanceof Dialog) {
dlg = new WebProxyDialog((Dialog) parent, host, port, user, pw);
} else if (parent instanceof Frame) {
dlg = new WebProxyDialog((Frame) parent, host, port, user, pw);
} else {
dlg = new WebProxyDialog((Frame) null, host, port, user, pw);
}
dlg.setVisible(true);
SocketAddress address = dlg.getSocketAddress();
if (address != null) {
proxy = new Proxy(Proxy.Type.HTTP, address);
rbm.setProxy(proxy);
rbm.setProxyUserName(dlg.getUserName());
rbm.setProxyPassword(dlg.getPassword());
}
}
};
if (SwingUtilities.isEventDispatchThread()) {
proxySpecifier.run();