Simple Java swing widgets for selecting directories, more intuitive than using the JFileChooser dialog.
By default, only a single directory can be selected, but this can be changed by calling the
setMultiSelectionEnabled(boolean)
method. Whether the returned directories are in order of
selection or alphabetically ordered can be influenced with setSortSelectedDirectories(boolean)
.
nz.ac.waikato.cms.adams.simpledirectorychooser.SimpleDirectoryChooserPanel
- panel that displays the directory structure.nz.ac.waikato.cms.adams.simpledirectorychooser.SimpleDirectoryChooser
-javax.swing.JFileChooser
-like dialog with very similar interface to make it easier to replace
Use the following dependency in your pom.xml
:
<dependency>
<groupId>nz.ac.waikato.cms.adams</groupId>
<artifactId>simple-directory-chooser</artifactId>
<version>0.0.3</version>
</dependency>
The following classes demonstrate the use of the widgets: