It’s easy ! You need set true the attribute expand of the yours nodes and parents. Example :
public TreeNode makeTree() MyObject myFatherObject = new MyObject(); // The first Node in the tree TreeNode root = new DefaultTreeNode(myFatherObject, null); TreeNode nodeRoot = new DefaultTreeNode(myFatherObject, root); TreeNode node = new DefaultTreeNode(holding, nodeRoot); node.setParent(nodeRoot); node.setExpanded(true); node.getParent().setExpanded(true); // The node sun of the above MyObject mySunObject = new MyObject(); TreeNode sunNode = new DefaultTreeNode( "objectType", mySunObject , node); sunNode.setExpanded(true); sunNode.setParent(nodePrincipal); sunNode.getParent().setExpanded(true); return root; }