title: How to list only non hidden and non system file in jtree
body: <pre><code>File f=new File("C:/");
  File fList[] = f.listFiles();
  </code></pre>
  
  <p>When i use this it list all system file as well as hidden files.</p>
  
  <p>and this cause <strong>null pointer exception</strong> when i use it to show in jTree like this:</p>
  
  <pre><code> public void getList(DefaultMutableTreeNode node, File f) {
   if(f.isDirectory()) {
       DefaultMutableTreeNode child = new DefaultMutableTreeNode(f);
       node.add(child);
       File fList[] = f.listFiles();
       for(int i = 0; i  &lt; fList.length; i++)
           getList(child, fList[i]);
       }
  }
  </code></pre>
  
  <p>What should i do so that it do not give <strong>NullPointerException</strong> and show only <strong>non hidden and non system files</strong> in jTree?</p>