title: Java - Desktop.getDesktop().open() - Wait until file is open?
body: <p>I'm searching for a solution to wait until a file is opened. My application opens pdf files and displays user-input dialogs but the dialog is overlapped by the pdf file. Is there a way to add a listener or something to show my dialog when the pdf file is fully open? </p>
  
  <p>I could use a delay or pause but that's not exactly what I want.</p>
  
  <p>I'm using</p>
  
  <pre><code>Desktop.getDesktop().open(new File("my.pdf"));
  </code></pre>