title: How to make the 'open with' dialog box?
body: <p>I  made a program to search for .txt files.</p>
  
  <p>If I click a file it means that the "open with" dialog box should appear, and that dialog box will contain a list of all installed programs.</p>
  
  <p>I am using this code for searching through the files:</p>
  
  <pre><code>  public File[] finder( String dirName)
    {
        // Create a file object on the directory.
        File dir = new File(dirName);
        // Return a list of all files in the directory.
        return dir.listFiles(new FilenameFilter();
    } 
  
    public boolean accept(File dir, String filename)
    { 
        return filename.endsWith(".txt");
    } 
  </code></pre>
  
  <p>What Java code can I use to make the "open with" dialog box appear?</p>