Hi there,
Why is it when I show an error Dialog in ConnectionRequest's handleErrorResponseCode method I get an EDT violation whereas when I add a response code listener to the ConnectionRequest and show the Dialog there, things are fine?
For example, EDT violation:
// When HTTP response received (not 200 OK or redirect)
@Override
protected void handleErrorResponseCode(int code, String message) {
// Show dialog -> EDT violation
Dialog.show("Error", "Code: " + code, "OK", null);
}
No EDT violation:
// When HTTP response received (not 200 OK or redirect)
r.addResponseCodeListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
NetworkEvent n = (NetworkEvent) evt;
// Show dialog -> No EDT violation
Dialog.show("Error", "Code: " + n.getResponseCode(), "OK", null);
}
});
Thanks