Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

JFileChooser - To use or not to use

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic