title: How can i get the path of files that i have choose in jfilechooser?
body: <p>In my program, I want to sent some files from client to server using socket programming. I'm using the <code>void setMultiSelectionEnabled(boolean b)</code> method so I can choose more than 1 file, but it gives me an error when i try to get the path of the file.  Here's my code:</p>
  
  <pre><code>    JFileChooser choose = new JFileChooser();
  
      choose.setAcceptAllFileFilterUsed(false);
      choose.addChoosableFileFilter(new FileNameExtensionFilter("Images", "jpg", "png", "jpeg"));
      choose.setAcceptAllFileFilterUsed(true);
      choose.setMultiSelectionEnabled(true);
      File[] f = choose.getSelectedFiles();
      choose.showOpenDialog(this);
  
      String filePath = f.getAbsolutePath();
      String fname = f.getName();
  
      Client_ftp cli = new Client_ftp();
      if(cli.kirim(filePath, fname)) {
          jLabel1.setText("Success. .");
      } else {
          jLabel1.setText("failed");
      }
  </code></pre>