0 Replies Latest reply on Nov 27, 2009 7:52 AM by 843807

    File Dialog Control Issue - SWT

      I have created a file dialog using eclispe's SWT. Here is the code:
      PrintWriter out = response.getWriter();
      Display display = new Display();
      Shell shell = new Shell(display, SWT.ON_TOP);
      String selectedFile = browseFile();
      MessageJSON fileNameJSON = new MessageJSON();
      try {
                      FileDialog fileDialog = new FileDialog(shell, SWT.SINGLE);
                      fileDialog.setFilterPath(System.getProperty("user.home")+ "/Desktop");
           fileDialog.setFilterExtensions(new String[] {"*.bin"});
           fileDialog.setFilterNames(new String[] {"Binary Files (*.bin)"});
           fileSelected = fileDialog.open();
           if (fileSelected != null) {
                filePath = fileSelected;
                } else {
                } catch (Exception e) {
      Now the issue is with the control. When I click on the "Browse" button from the JSP, the file dialog opens, but the control will be on the browser but not on the file dialog. When the file dialog is open and on click of "Esc", it doesnot close as the control rests on the browser still. Can you please suggest how to get the control on to file dialog? Thanks in advance.