JFileChooser select directory but show files

Posted by Jeff Storey on Stack Overflow See other posts from Stack Overflow or by Jeff Storey
Published on 2010-05-21T15:34:20Z Indexed on 2010/05/21 15:50 UTC
Read the original article Hit count: 177

Filed under:
|
|

I feel like there should be a simple way to do this but I can't figure it out. I have a JFileChooser that allows the user to select directories. I want to show all the files in the directories to give the user some context, but only directories should be accepted as selections (maybe the Open button would be disabled when a file is selected). Is there an easy way of doing this?

© Stack Overflow or respective owner

Related posts about java

Related posts about jfilechooser