Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating JTable inside node of JTree

I know that this question is being asked before but I did not get proper solution.
I read about outline but that was just opposite of what I want i.e. JTable inside JTree
I want to display data in a JTable but it is stored as different groups,so these groups
are node of JTree when I expend one group(node) the JTable of that group is shown.

I went through this article in oracle :Creating TreeTables in Swing:part 1

This was pretty old and not working on my version of java(I don't know why !),so I went
through the next part of TreeTable :Creating TreeTables in Swing: Part 2

The whole code was comparatively new, as it was using "javax.swing" in place of
"com.sun.java.swing" but the problem I faced here was one file named as
"FileSystemModel2.java" was missing it is modified from previous version so I can't work
with old one.There are some method added to new "FileSystemModel.java".How do I inform
them about this missing file or if you have different approach please let me know.

What I want to achieve is shown in picture below :


Image implementing JTreeTable

This image was from "LastPass" and I want to make my own password manager as my project
So please help me with this I am so close but yet I can't move further.

like image 308
Nav S Avatar asked Aug 27 '11 22:08

Nav S


1 Answers

The SwingX project contains a ready-made TreeTable

http://swingx.java.net/

The downloads are a bit hard to find, so here is the link:
http://java.net/downloads/swingx/releases/1.6.2/

A short article about using that component can be found here:
http://sandarenu.blogspot.com/2008/02/treetable-in-java-using-swingx.html

like image 147
a_horse_with_no_name Avatar answered Sep 18 '22 19:09

a_horse_with_no_name