Java: Pointer le JFileChooser sur le répertoire Courant

Author:

 int,string,char,static, url, socket, url, socket, java
Download

 
import javax.swing.JFileChooser;
 
 public class TestJFileChooser
{
 
  public static void main(String[]arg)
   {
          JFileChooser chooser=new JFileChooser(".");
          int result= chooser.showOpenDialog(null);
          if(result==JFileChooser.CANCEL_OPTION)
              return;
          String BD=chooser.getSelectedFile().getAbsolutePath();
          System.out.println(BD);
 
    }
}

Cet article Java: Pointer le JFileChooser sur le répertoire Courant est apparu en premier sur .