JTree displays the System files in a tree format, JTable displays the list of files in the selected path.
Project Demo: File Explorer
Displaying System files
Right clicking on the JTree and JTable opens the Popup Menu of Options to manipulate files
Selecting the Rename Options, pops a JOptionPane to input the new file name
Selecting the Delete Option, pops a JOptionPane to confirm if the user wants to delete the file
Selecting the Open option, opens a new JDialog which displays the contents of the file, which can be edited
Contents of the edited file can be saved by clicking on Edit -> Save
Selecting a file or directory in the JTree and Clicking the Refresh Button, Refreshes the JTree to point on that particular path
To go back to the Home Directory, click on the below Home Button
- some unexpected file names throw a runtime error, but they can be ignored as it doesn't affect the working of the application.
- After updating files, the explorer may not refresh automatically, refresh and home buttons will refresh the explorer to the current updated state.