Rob Camick wrote:I have no idea what you mean by text files.
Have you read the JFileChooser API and followed the link to the Swing tutorial on "How to Use File Choosers"? There you will find an example that filters images. You can modify the example to meet your "text file" definition.
Oh, sorry. I meant files on windows computers with the .txt extension.
@Mark Vedder. Thanks for that link, I actually got it to only display text files from that code. Unfortunately I still have a problem. I still want the directories to show up so that the user can find the text file in a directory, and I tried using fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES) but that still didn't show the directories... any ideas?