title: JFileChooser not showing
body: <p>I have had a problem concerning the JFileChooser for a long while now and haven't been able to find help... The problem is that the file window is not showing up. I have tried to find the cause of this problem and I have tested the following:</p>
  
  <pre><code>public class Test {
     public static void main (String[] args) {   
     load();     
     }
     public static void load () {
        String folder = System.getProperty("user.dir");
        JFileChooser fc = new JFileChooser(folder);
        int resultat = fc.showOpenDialog(null);  
     }
  }
  </code></pre>
  
  <p>When running this code I do get the window to show.</p>
  
  <p>But, when I try this:</p>
  
  <pre><code>public class Test {
      public static void main (String[] args) {   
      String input = JOptionPane.showInputDialog(null, "Make your choice!\n" +
                                                       "1. load file");      
      load();   
  
      }
  }
  </code></pre>
  
  <p>the window is not showing however, the programming is still running...
  I have no clue what might be causing this problem</p>