dialog.setVisible(true);
}
});
synchronized (answer) {
while (answer.get() == USER_WAITINGFORSELECTION)
answer.wait();// wait for a user to make a response
}
} catch (InvocationTargetException e) {
e.printStackTrace();
// if we cannot make a call, return a negative number - nothing do
// not know what else to do about it.