Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

FileChooser customization

 
Eric Chang
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on an application which will only allow users to access the directories within a CD-ROM or Memory Stick on a SUN box...the locations of these two media devices will be predetermined...however, what I want to prevent is the user from being able to navigate outside the directory, so I would like to disable the ".." option from being there once the user is in the parent directory of the CD or the memory stick.
Is this possible?
 
Darryl Burke
Bartender
Posts: 5155
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to use a FileFilter. Something like (not exhaustively tested)

[ May 18, 2008: Message edited by: Darryl Burke ]
 
Eric Chang
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Excellent...thanks. I will try it out when I get around to implementing it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!