TreeTables In Swing

Posted on 2004-09-27
Last Modified: 2010-05-18
I am looking for an example showing how to browse a local file system.
One way to do this is with a tree table.

I see this:
but it appears to be somewhat dated.

Is there a more contemporary example?
Question by:allelopath

Expert Comment

ID: 12164433
Not sure what you are trying to acheive by browsing a file system. If it is to select a file(s), how about using the JFileChooser class. Makes everything very easy.

    JFileChooser chooser = new JFileChooser();
    // Note: source for ExampleFileFilter can be found in FileChooserDemo,
    // under the demo/jfc directory in the Java 2 SDK, Standard Edition.
    ExampleFileFilter filter = new ExampleFileFilter();
    filter.setDescription("JPG & GIF Images");
    int returnVal = chooser.showOpenDialog(parent);
    if(returnVal == JFileChooser.APPROVE_OPTION) {
       System.out.println("You chose to open this file: " +

Hope this helps

Author Comment

ID: 12165647
Nope, not JFileChooser, I've already looked at that, and its not what i need.
I'm making an application in which a source file(s) is selected in the left window and the destination directory is on the right.
LVL 18

Expert Comment

ID: 12166588
If you need a Tree table this is an example

if you need a commercial treeTable, see this Hierarchical Table of JideSoft
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

LVL 18

Expert Comment

ID: 12166597
the Above link you mentioned is also workable

Author Comment

ID: 12169084
The javaboutique example is an applet, as I said I'm making an application.
LVL 18

Expert Comment

ID: 12169287
>>The javaboutique example is an applet, as I said I'm making an application.
The source code is attached in the link, you can extract it JTable code from it.
It will be similarly used in an Application ..

You can aslo see the other examples I have placed as links

Author Comment

ID: 12403471
My question has not been answered
armogham suggested 3 sites.
The first is an applet, not an application as i requested.
The second is a commerical application, not an example
The third i had already pointed out.
LVL 18

Accepted Solution

armoghan earned 50 total points
ID: 12407093
The applet can be converted to an Application as teh source code is available.
Its not a Commerical application , its a commerical component. of treeTable. If you can buy.
The third thing is what you alerady pointed out. I have used it as well once I was evaluating TreeTable.. It work fine as well and is not outdated.

Expert Comment

ID: 23801099
There is this Outline class:

It does successfully do a Tree Table, however, I am having some problems with it.  First of all, it does not respond to my updateUI() calls to  update the tree itself.  The tree is completely hidden.  I currently need to fix both the updating and figure out how to expand all rows.  I have been able to do it with JTree, but using expandRow(int) and only expandPath(TreePath) exists in Outline, which I haven't managed to use yet.

So the summary, Outline works, but has limitations and even what I'd call bugs.

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to get all the API from website? 11 82
ForLoop Example 3 47
couple of eclipse 5 35
Facing this issue for maven proxy setting 2 8
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now