Array « JTree « Java Swing Q&A





1. Populating a JTree from an array of objects using NetBeans    stackoverflow.com

I'm trying to populate a JTree from an array of Objects where A's ObjName is the parent and B's ObjName1 are leaf nodes.

class A {
    int a;
  ...

2. JTree - Save and load from an array?    java-forums.org

Hi! I'm trying to allow users to create a hierarchy of folders from a Java gui page. I found the best representational method of showing a hierarchy of folders to a user with a gui is with a JTree? I can create a JTree, but i need the user to be able to add/remove and modify nodes on the JTree to ...

3. Building a Jtree from Array    java-forums.org

Hi All, I am fairly new to java and I am struggling with the JTree object. Basically, I want to populate the JTree with the following data: String[][] userGroups = {{group 1, user1}, {group 1, user2}, {group 1, user3}, {group 2, user 4}, {group 2, user5,}, {group 3, user6}} I would like the JTree to look like this: Root Group 1 ...