The folder tree view sample creates and displays the folder tree under an optional folder using the JFTree class and JFSimpleTreeNode class.
The folder tree view sample uses the following classes:
JFTree
JFSimpleTreeNode
JFStatusbar
JFChoice
JFGroupbox
JFPanel
Figure 1.28 Folder tree view sample
Operation method
Entering the folder to be displayed with a full path in the folder path input field (Choice under "folder path:") and pressing the [Enter] key displays the folder tree using the specified path as the root node.
The processing status is displayed on the lower status bar.
Selecting an optional folder displayed on the folder tree using the mouse or keyboard displays the selected folder on the status bar.
The path data entered can be stored in the folder path input field (Choice under "folder path:") and the path can be selected therefrom.
Source codes
Folder tree view sample:"Sample Storage Destinations"/jftree/filefolder/JFTreeSample.java
Folder tree view:"Sample Storage Destinations"/jftree/filefolder/FolderTreeView.java
Folder tree view listener:"Sample Storage Destinations"/jftree/filefolder/FolderTreeViewListener.java