I need to create a gui application.. When the user clicks the start button use a JFileChooser to allow them to pick a directory from the system and then run the recursive search of the file system from that directory and display the directory and each file in the JTextArea.

Here is what I have... My problem is that I cant get the directory or files to print in the JTextArea.. Can someone please help me? Here is my action code.

public void actionPerformed(ActionEvent evt)
               //which button
               if (evt.getSource() == quitButton)
            else if (evt.getSource() == openButton)
                //create a filechooser
    JFileChooser chooser = new JFileChooser();
    int returnVal = chooser.showOpenDialog(null);
    if(returnVal == JFileChooser.APPROVE_OPTION){
       File dir = new File("");

    File[] children = dir.listFiles();
    if(children == null){
        //either directory does not exit or is not a directory
        for (int i=0; i<children.length; i++){
            //get filename of file or directory
            File fileName = children[i];

       //create the inheritance to each button
         FileSearchListener buttListener = new FileSearchListener();

You have a loop where you get each file name in turn, but you do nothing with them. You know how to append text to your result area, so...

ps: When you post your code, post it properly indented in CODE tags.