如果MyDialog不是在Thread中new的话,当然可以响应事件,我试过了。

解决方案 »

  1.   

    难道在线程中产生的Dialog不能响应事件?
      

  2.   

    先去看书学习去,书中说:
    The single-thread rule is as follows:
    Rule:  Once a Swing component has been realized, all code that might affect or depend on the state of that component should be executed in the event-dispatching thread.
      

  3.   

    是的,使用SwingUtlity.invokelater就好了啦!各位