日期:2014-05-20  浏览次数:20803 次

JFileChooser如何设定默认地址为FTP登录地址?
        }
我用的是org.apache.commons.net.ftp.*;这个包                


FTPClient   f   =   new   FTPClient();
f.connect(server);
        f.login(username,   password);
        System.out.println(f.printWorkingDirectory());  
        if   (f.isConnected()){
       
        JFileChooser   chooser   =   new   JFileChooser();
if     (chooser.showOpenDialog(null)   !=   JFileChooser.APPROVE_OPTION)
      return;
      File   fi   =   chooser.getSelectedFile();
       
  }
        else{
        JOptionPane.showMessageDialog(null, "Connot   Connect! ");
        System.exit(0);
}

------解决方案--------------------
up