Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to set the filter for a Save File Dialog for Folders?

 
netharam ram
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I want to set the filter for the Save FileDialog to "Folders".You could see in winamp to add a directory u'll be listed a listof folders & drives alone with a different presentation, I want that in my applicaton.
Please reply as soon as possible.
Happy middling with java.
Netharam.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should find plenty of examples of file filters if you look at the tutorial How to Use File Choosers from Sun...

Basically, if you make a class like this for your file chooser to use, you will only get directories...



-Nate
 
netharam ram
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Nate I didn't expect this reply.I found an example of a JDialog using a filter to restrict to diaplay folders alone,but missed it.
I think it was as
new JDialog("Directories_alone",.....);
or something like that,but doesn't remember that.If u could try this out,it would be helpful for me.
Happy middling with java.
Netharam.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!