I have the following fun
which will be executed by non event dispatching thread. In the middle of thread, I want a
May be I do not understand the question, but I do not get the answers either... if you want the calling thread to block on the call to fun(), why display the JOptionPane in a new (parallel) Thread? Shouldn't this be sufficient?
public int fun() {
return JOptionPane.showConfirmDialog(null, message, title, JOptionPane.YES_NO_OPTION);
}
PS How do you define a non event dispatching thread?