Forum Stats

  • 3,733,362 Users
  • 2,246,748 Discussions
  • 7,856,667 Comments

Discussions

Jfilechooser dialog box is not displaying on client side

Hello Experts,

I am having a application server hosting client files.

I have used jfilechooser to enable the client to download their files.

However, when the client clicks on the download button, the dialog box is initializing on the application side hosting the files instead of the client desktop.

Following is the code snippet that I am using

public static Result downLoad1() throws Exception

        {

                System.out.println("Start");

                JFileChooser chooser=new JFileChooser();

                chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);

                 chooser.setAcceptAllFileFilterUsed(false);

                 chooser.showOpenDialog(null);

                 System.out.println("end");

                return ok("success");

        }

Please help

This discussion has been closed.