Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8140196

No response on "new javax.swing.JFileChooser()" during running applet.

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      windows_7

      Description

      FULL PRODUCT VERSION :
      java version "1.7.0_60-ea"
      Java(TM) SE Runtime Environment (build 1.7.0_60-ea-b13)
      Java HotSpot(TM) Client VM (build 24.60-b09, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]
      Microsoft Windows [Version 6.3.9600]

      A DESCRIPTION OF THE PROBLEM :
      No response on "new javax.swing.JFileChooser()" during running our applet program.


      REGRESSION. Last worked in version 7u51

      ADDITIONAL REGRESSION INFORMATION:
      java version "1.7.0_51"
      Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
      Java HotSpot(TM) Client VM (build 24.51-b03, mixed mode, sharing)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      package test;

      import java.io.File;
      import java.util.ArrayList;
      import java.util.List;
      import javax.swing.JFileChooser;
      import javax.swing.UIManager;
      import javax.swing.UnsupportedLookAndFeelException;

      /**
       *
       */
      public class JFileChooserTest {

          private List<String> filePathList = new ArrayList<>();

          public static void main(String[] args) {
              new JFileChooserTest().test();
          }

          private void test() {
              
              String fileDirPath = null;
              try {
                  UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
              } catch (ClassNotFoundException e) {
                  e.printStackTrace();
              } catch (InstantiationException e) {
                  e.printStackTrace();
              } catch (IllegalAccessException e) {
                  e.printStackTrace();
              } catch (UnsupportedLookAndFeelException e) {
                  e.printStackTrace();
              }
              JFileChooser chooser = new JFileChooser();
              chooser.setDialogTitle("TEST");
              chooser.setMultiSelectionEnabled(false);
              chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
              if (chooser.showOpenDialog(null) != JFileChooser.APPROVE_OPTION) {
                      System.exit(1);
              }
              File root = chooser.getSelectedFile();
              
              searchFile(new File(root.getPath()));
              for (String path : filePathList) {
                  System.out.println(path);
              }
              System.out.println("END");
          }
          
          private void searchFile(File file) {
              if (file.isDirectory()) {
                  File[] files = file.listFiles();
                  for (File child : files) {
                      searchFile(child);
                  }
              }
              else if (file.isFile()) {
                  filePathList.add(file.getPath());
              }

          }
      }


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      No error
      ACTUAL -
      No response at "new javax.swing.JFileChooser()".

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Same as in "Steps to Reproduce"
      ---------- END SOURCE ----------

        Attachments

          Activity

            People

            Assignee:
            pardesha Pardeep Sharma
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: