Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JFileChooser - To use or not to use

 
Jarrod Littlejohn
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was developing my Client GUI on the w/e and decided to use a JFileChooser for selecting the db file in Local Mode. It does what I expect...
BUT. I'd like to disable the Create folder icon and fix the No Disk in Drive A: error (plus other problems when using in a network env). And its not easy to do. So my question is - Is it worth while using this component. Has anyone used this for this application? Why or why not???
Regards,
Jarrod
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it is a cool idea, but not really necessary. You can tell the assessor where to put the db.db file, and not get deducted points. I had my db.db file in my root directory with the executable jar's, and jarred it all into the submission jar, which when unjarred put the db.db file in the correct directory for both local and server modes.
I have no idea how to remove things from the JFileChooser. There doesn't seem to appear to be any changes that can be made except. Whether it's an Open, Save, or Custom. Custom being file operation, not the other buttons. And the other thing you can change is the Text on the Accept and Cancel buttons.
FileSystemView, might be an object that you can use to not have the A: drive show. But that's a guess.
Mark
Mark
 
Jarrod Littlejohn
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the input Mark. I think you're right when you say it's not necessary but I've invested time and sweet in building it this way so I think I'm going to go stick with it.
My recommendation to JavaRanchers is to not use it...only because I've encountered I bunch of pitfalls from it.
I guess it comes down to an issue of JFileChooser being too functional for the task at hand...i.e. the fact that a user can create a directory (not good). But the "coolness" factor is just too much for me to resist.
By the way were you working on some kind of a slag against my name jarred vs Jarrod. I hope thats not the case
Take care
[ January 29, 2002: Message edited by: Jarrod Littlejohn ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I meant jarred as in the jar file was completed. I put all the files into the jar, and the past tense of jar is jarred.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic