remote FileChooser using OtrosVFSBrowser

349 views Asked by At

I'm trying to do a remote filechooser. I read a lot of information but I don't get it. The best site I've seen is (https://code.google.com/p/otrosvfsbrowser/) because is exactly what I want but I don't fine more information. Are Someone of you using this tool? where are any example code? I already use JSCH library to transfer via SFTP, but I want a tool to choose the remote path. I'm starting in Java. sorry for my English.

1

There are 1 answers

2
KrzyH On

You can check example code on Usage page You can just create dialog and register action on approve:

JOtrosVfsBrowserDialog jOtrosVfsBrowserDialog = new JOtrosVfsBrowserDialog();
Action a = new AbstractAction("Select file") {
  @Override
  public void actionPerformed(ActionEvent actionEvent) {

    if (JOtrosVfsBrowserDialog.ReturnValue.Approve.equals(jOtrosVfsBrowserDialog.showOpenDialog(TestDialog.this,"title"))){
        String friendlyUrl = jOtrosVfsBrowserDialog.getSelectedFile().getName().getFriendlyURI();
    }
  }
};