title: Close a java modal JDialog from within the owner class (a JFrame)
body: <p>i am feeling a bit bad about this question because i think this is probably not the
  way a JDialog should be used but anyway:</p>
  
  <p>I have a very simple JDialog that just contains a label and i want to show it
  in situations where the application is running a task that just runs for a few
  seconds on the main swing thread. The dialog has to be model to make sure that 
  the user cannot click anything on the main GUI while the short blocking task is
  executed. When the task is done, the modal dialog should be disposed of without
  any user interaction... and this does not seem to work with a modal dialog since
  once it's setVisible(true) method is called, execution seems to stop and i can't
  figure out how to close it from the owner side without user interaction...</p>
  
  <p>I would be very grateful for help or suggestions on how to implement such a blocking
  dialog in a different way.</p>