In this section, you will learn to hide the root node of a JTree.
Description of the Program:
The following program helps to hide the root node of the Jtree component. This program creates a tree that contains multiple nodes where the root node is kept hidden. The getProperty() method determines the current system properties. This method returns the multiple data of system that will be displayed in a node. For hiding root node we set the setRootVisible is 'false'.
Here is the code of this program:
import javax.swing.*;
|
Output this program:

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Tree Root Hide in Java
Post your Comment