title: Bringing JFileChooser on top of all windows
body: <p>I seem to have a problem with my very simple implementation of a file chooser dialogue that requires me to minimize Netbeans each time in order to get to it, and it gets pretty frustrating specially now with testing.</p>
  
  <p>I have seen a few solutions online including <a href="https://stackoverflow.com/questions/309023/howto-bring-a-java-window-to-the-front">SO</a> yet none seem to do the trick, while some other seem very lengthy and complicated for my current level.  </p>
  
  <pre><code>private void fileSearch() {
  
      JFileChooser fileSelect = new JFileChooser();
      int returnVal = fileSelect.showOpenDialog(null);
      String pathToFile;
  
      if (returnVal == JFileChooser.APPROVE_OPTION) {
          File file = fileSelect.getSelectedFile();
          pathToFile = file.getAbsolutePath();
          try {
              P.binaryFileToHexString(pathToFile);
          } catch (Exception e) {
              System.out.print("Oops! there was an error there..." + e);
          }
          System.out.println("\nYou chose to open this file: " + file.getName());
      }
  }
  </code></pre>
  
  <p>Some of my try's include using;</p>
  
  <pre><code>.requestFocus();
  .requestFocusInWindow();
  .setVisible();
  </code></pre>
  
  <p>Is there a particular attribute/method I can set in order to solve the problem?</p>