• 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 ...
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Selecting a directory using a JFileChooser

Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my application, the user selects a directory to use from a JFileChooser. This works well enough by setting the JFileChooser to DIRECTORIES_ONLY and showing the dialog as usual.
However, not many people I've tested the program on seem to be able to figure out how to use it. I'd much rather be able to select the currently viewed directory when the user clicks Open, as opposed to the currently selected directory.
Does anyone know how I would do this?
    Bookmark Topic Watch Topic
  • New Topic