Here's a relatively simple file browser built in JPanel :
Here are some more complex file browser examples with icons, pop-up menus, and tooltips.
They are all built in JFrame :
These examples are probably not as customizable as you might wish, but they are pretty good starting points for adding new features.
For further reading, Swing, Second Edition (chapter 17) goes through the implementation of the JTree component to view your file system complete with lazy loading, custom renders, pop-up menus and tooltips.
If you want to see only the source, you can get here here .
There is also a FileBro that you can take a look at. Perhaps you can use it, or at least borrow implementation details.
source share