title: JFileChooser cancel button returning APPROVE_OPTION
body: <p>this is my first question here so please bear with me. I have this JFileChooser here, and even though I hit "Cancel" in the window, it returns APPROVE_OPTION as oppose to CANCEL_OPTION. It is a save dialog which I open like this </p>
  
  <p><code>returnVal_2 = fileChooser_2.showSaveDialog(frame);</code></p>
  
  <p>And here is the initialization and usage of it</p>
  
  <pre><code>fileChooser_2 = new JFileChooser();
  fileChooser_2.addActionListener(new ActionListener() {
  
      @Override
      public void actionPerformed(ActionEvent e) {
          if (returnVal_2 == JFileChooser.APPROVE_OPTION) {
              savePath = fileChooser_2.getCurrentDirectory();
              System.out.println("yes");
          } else if (returnVal_2 == JFileChooser.CANCEL_OPTION) {
              System.out.println("no");
          }
      }
  });
  </code></pre>
  
  <p>It works as it's supposed to when I hit "Save" (which by the way, also returns APPROVE_OPTION).</p>