简体   繁体   中英

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 ie 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 :


实现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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM