If true, a node is a leaf node if it does not allow children. That lets you distinguish between folder nodes and file nodes in a file system, for example. If this value is false, then any node which has no children is a leaf node, and any node may acquire children. This will throw an IllegalArgumentException if root is null. Returns the root of the tree.
Returns null only if the tree has no nodes.
Returns whether the specified node is a leaf node. The way the test is performed depends on the askAllowsChildren setting. The model will notify all of its listeners that the model has changed. This sets the user object of the TreeNode identified by path and posts a node changed. If you use custom user objects in the TreeModel you're going to need to subclass this and set the user object of the changed node to something meaningful.